Teach reassociate to commute FMul's and FAdd's in order to canonicalize the order...
[oota-llvm.git] / test / Transforms / InstSimplify / undef.ll
index 8134cc8487499215ebfa1bc74a7391e34394a366..23cd50f92b40f7b0f666cfa4089433403444e0ff 100644 (file)
@@ -84,6 +84,13 @@ define i64 @test11() {
   ret i64 %r
 }
 
+; @test11b
+; CHECK: ret i64 undef
+define i64 @test11b(i64 %a) {
+  %r = shl i64 %a, undef
+  ret i64 %r
+}
+
 ; @test12
 ; CHECK: ret i64 undef
 define i64 @test12() {
@@ -91,6 +98,13 @@ define i64 @test12() {
   ret i64 %r
 }
 
+; @test12b
+; CHECK: ret i64 undef
+define i64 @test12b(i64 %a) {
+  %r = ashr i64 %a, undef
+  ret i64 %r
+}
+
 ; @test13
 ; CHECK: ret i64 undef
 define i64 @test13() {
@@ -98,6 +112,13 @@ define i64 @test13() {
   ret i64 %r
 }
 
+; @test13b
+; CHECK: ret i64 undef
+define i64 @test13b(i64 %a) {
+  %r = lshr i64 %a, undef
+  ret i64 %r
+}
+
 ; @test14
 ; CHECK: ret i1 undef
 define i1 @test14() {
@@ -125,3 +146,10 @@ define i64 @test17(i64 %a) {
   %r = select i1 undef, i64 undef, i64 %a
   ret i64 %r
 }
+
+; @test18
+; CHECK: ret i64 undef
+define i64 @test18(i64 %a) {
+  %r = call i64 (i64)* undef(i64 %a)
+  ret i64 %r
+}