summaryrefslogtreecommitdiffstats
path: root/llvm/test/Feature
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2015-12-14 19:11:35 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2015-12-14 19:11:35 +0000
commit2de4d0aa18ef099d41ff07878dcad2d796b1e31e (patch)
tree04764ab765734d7ba8e9913ff339696980d37b92 /llvm/test/Feature
parentd44a1fd506a748122ebdf2053cebc09b737159d6 (diff)
downloadbcm5719-llvm-2de4d0aa18ef099d41ff07878dcad2d796b1e31e.tar.gz
bcm5719-llvm-2de4d0aa18ef099d41ff07878dcad2d796b1e31e.zip
Teach haveSameSpecialState about operand bundles
llvm-svn: 255527
Diffstat (limited to 'llvm/test/Feature')
-rw-r--r--llvm/test/Feature/OperandBundles/special-state.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/Feature/OperandBundles/special-state.ll b/llvm/test/Feature/OperandBundles/special-state.ll
new file mode 100644
index 00000000000..56e337cc16b
--- /dev/null
+++ b/llvm/test/Feature/OperandBundles/special-state.ll
@@ -0,0 +1,21 @@
+; RUN: opt -S -early-cse < %s | FileCheck %s
+
+; This test isn't directly related to EarlyCSE or varargs. It is just
+; using these as a vehicle for testing the correctness of
+; haveSameSpecialState around operand bundles.
+
+declare i32 @foo(...)
+
+define i32 @f() {
+; CHECK-LABEL: @f(
+ entry:
+; CHECK: %v0 = call i32 (...) @foo(
+; CHECK: %v1 = call i32 (...) @foo(
+; CHECK: %v = add i32 %v0, %v1
+; CHECK: ret i32 %v
+
+ %v0 = call i32 (...) @foo(i32 10) readonly [ "foo"(i32 20) ]
+ %v1 = call i32 (...) @foo() readonly [ "foo"(i32 10, i32 20) ]
+ %v = add i32 %v0, %v1
+ ret i32 %v
+}
OpenPOWER on IntegriCloud