From abe776a7949532ebb5df1099edf2eaab22d8bd2b Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 4 Nov 2011 18:39:16 +0000 Subject: [PATCH] Add tests for existing InstSimplify features. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143721 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/InstSimplify/undef.ll | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/Transforms/InstSimplify/undef.ll b/test/Transforms/InstSimplify/undef.ll index 9f5a1e82f5f..23cd50f92b4 100644 --- a/test/Transforms/InstSimplify/undef.ll +++ b/test/Transforms/InstSimplify/undef.ll @@ -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() {