llvm-6502/lib/Transforms
Chris Lattner 783ccdb5c4 Add some simplifications for demanded bits, this allows instcombine to turn:
define i64 @test(i64 %A, i32 %B) {
        %tmp12 = zext i32 %B to i64             ; <i64> [#uses=1]
        %tmp3 = shl i64 %tmp12, 32              ; <i64> [#uses=1]
        %tmp5 = add i64 %tmp3, %A               ; <i64> [#uses=1]
        %tmp6 = and i64 %tmp5, 123              ; <i64> [#uses=1]
        ret i64 %tmp6
}

into:

define i64 @test(i64 %A, i32 %B) {
        %tmp6 = and i64 %A, 123         ; <i64> [#uses=1]
        ret i64 %tmp6
}

This implements Transforms/InstCombine/add2.ll:test1


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34919 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 00:02:29 +00:00
..
Hello eliminate static ctor from example. 2006-12-19 22:24:09 +00:00
Instrumentation remove reoptimizer-specific passes 2007-02-20 05:31:49 +00:00
IPO Unbreak VC++ build. 2007-03-05 00:00:42 +00:00
Scalar Add some simplifications for demanded bits, this allows instcombine to turn: 2007-03-05 00:02:29 +00:00
Utils Make sure debug code is not evaluated in non-debug case. 2007-03-02 23:15:21 +00:00
Makefile For PR1072: 2007-02-03 23:15:56 +00:00