From e4412c1f0b636980d77a518b76e94559830eeaed Mon Sep 17 00:00:00 2001 From: Chris Lattner <sabre@nondot.org> Date: Mon, 4 Jan 2010 06:03:59 +0000 Subject: implement an instcombine xform needed by clang's codegen on the example in PR4216. This doesn't trigger in the testsuite, so I'd really appreciate someone scrutinizing the logic for correctness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92458 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/InstCombine/or.ll | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/Transforms') diff --git a/test/Transforms/InstCombine/or.ll b/test/Transforms/InstCombine/or.ll index 44228ba..822dfb3 100644 --- a/test/Transforms/InstCombine/or.ll +++ b/test/Transforms/InstCombine/or.ll @@ -307,3 +307,16 @@ define i1 @test29(i32* %A, i32* %B) { ; CHECK: ret i1 } +; PR4216 +define i32 @test30(i32 %A) { +entry: + %B = or i32 %A, 32962 + %C = and i32 %A, -65536 + %D = and i32 %B, 40186 + %E = or i32 %D, %C + ret i32 %E +; CHECK: @test30 +; CHECK: %B = or i32 %A, 32962 +; CHECK: %E = and i32 %B, -25350 +; CHECK: ret i32 %E +} -- cgit v1.1