summaryrefslogtreecommitdiff
path: root/test/Transforms/FunctionAttrs/readattrs.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/FunctionAttrs/readattrs.ll')
-rw-r--r--test/Transforms/FunctionAttrs/readattrs.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/FunctionAttrs/readattrs.ll b/test/Transforms/FunctionAttrs/readattrs.ll
index aabdfe8d2005f..65861a55fc2d7 100644
--- a/test/Transforms/FunctionAttrs/readattrs.ll
+++ b/test/Transforms/FunctionAttrs/readattrs.ll
@@ -1,4 +1,5 @@
; RUN: opt < %s -functionattrs -S | FileCheck %s
+; RUN: opt < %s -aa-pipeline=basic-aa -passes='cgscc(function-attrs)' -S | FileCheck %s
@x = global i32 0
declare void @test1_1(i8* %x1_1, i8* readonly %y1_1, ...)
@@ -103,3 +104,11 @@ define <4 x i32> @test12_2(<4 x i32*> %ptrs) {
%res = call <4 x i32> @test12_1(<4 x i32*> %ptrs)
ret <4 x i32> %res
}
+
+; CHECK: define i32 @volatile_load(
+; CHECK-NOT: readonly
+; CHECK: ret
+define i32 @volatile_load(i32* %p) {
+ %load = load volatile i32, i32* %p
+ ret i32 %load
+}