summaryrefslogtreecommitdiffstats
path: root/llvm/test/ThinLTO/X86/Inputs/index-const-prop-cache-foo.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/ThinLTO/X86/Inputs/index-const-prop-cache-foo.ll')
-rw-r--r--llvm/test/ThinLTO/X86/Inputs/index-const-prop-cache-foo.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/ThinLTO/X86/Inputs/index-const-prop-cache-foo.ll b/llvm/test/ThinLTO/X86/Inputs/index-const-prop-cache-foo.ll
new file mode 100644
index 00000000000..5f85f1e38c9
--- /dev/null
+++ b/llvm/test/ThinLTO/X86/Inputs/index-const-prop-cache-foo.ll
@@ -0,0 +1,19 @@
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+@gFoo = internal unnamed_addr global i32 1, align 4
+
+; Function Attrs: norecurse nounwind readonly ssp uwtable
+define i32 @foo() local_unnamed_addr {
+ %1 = load i32, i32* @gFoo, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nounwind ssp uwtable
+define void @bar() local_unnamed_addr {
+ %1 = tail call i32 @rand()
+ store i32 %1, i32* @gFoo, align 4
+ ret void
+}
+
+declare i32 @rand() local_unnamed_addr
OpenPOWER on IntegriCloud