From be59acbfcced144c0e503df47ebaa7439fec9ee1 Mon Sep 17 00:00:00 2001 From: Lauro Ramos Venancio Date: Wed, 6 Jun 2007 17:10:02 +0000 Subject: [PATCH] Add a test for PR1499. llvm-svn: 37473 --- .../InstCombine/2007-06-06-AshrSignBit.ll | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 llvm/test/Transforms/InstCombine/2007-06-06-AshrSignBit.ll diff --git a/llvm/test/Transforms/InstCombine/2007-06-06-AshrSignBit.ll b/llvm/test/Transforms/InstCombine/2007-06-06-AshrSignBit.ll new file mode 100644 index 000000000000..482c60869600 --- /dev/null +++ b/llvm/test/Transforms/InstCombine/2007-06-06-AshrSignBit.ll @@ -0,0 +1,22 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {ashr} +; PR1499 + +define void @av_cmp_q_cond_true(i32* %retval, i32* %tmp9, i64* %tmp10) { +newFuncRoot: + br label %cond_true + +return.exitStub: ; preds = %cond_true + ret void + +cond_true: ; preds = %newFuncRoot + %tmp30 = load i64* %tmp10 ; [#uses=1] + %.cast = zext i32 63 to i64 ; [#uses=1] + %tmp31 = ashr i64 %tmp30, %.cast ; [#uses=1] + %tmp3132 = trunc i64 %tmp31 to i32 ; [#uses=1] + %tmp33 = or i32 %tmp3132, 1 ; [#uses=1] + store i32 %tmp33, i32* %tmp9 + %tmp34 = load i32* %tmp9 ; [#uses=1] + store i32 %tmp34, i32* %retval + br label %return.exitStub +} +