OSDN Git Service

fix a miscompilation of:
authorChris Lattner <sabre@nondot.org>
Wed, 11 Apr 2007 05:45:39 +0000 (05:45 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 11 Apr 2007 05:45:39 +0000 (05:45 +0000)
commit66bc325bff2a939a88d4b644fedc5f43e381a21d
tree310435a8fb0f3a45d4d9d06088614d7ca4a3ab81
parentb062000c23df482e16c6ce9efe3829c31b0fe9c3
fix a miscompilation of:
define i32 @test(i32 %X) {
entry:
        %Y = and i32 %X, 4              ; <i32> [#uses=1]
        icmp eq i32 %Y, 0               ; <i1>:0 [#uses=1]
        sext i1 %0 to i32               ; <i32>:1 [#uses=1]
        ret i32 %1
}

by moving code out of commonIntCastTransforms into visitZExt.  Simplify the
APInt gymnastics in it etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35885 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp