X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FTransforms%2FInstCombine%2Fzext.ll;h=10eabf7aed46a63bfc8f8cc21baa3162d212b8c1;hb=dc89737bcdbb8f69d8ae7578bdfa904cabcfc5ed;hp=c926a65065350fdfd23e4b00682826322431cfdc;hpb=3e054fe9efc64596534bbae0d1634ed15181d642;p=oota-llvm.git diff --git a/test/Transforms/InstCombine/zext.ll b/test/Transforms/InstCombine/zext.ll index c926a650653..10eabf7aed4 100644 --- a/test/Transforms/InstCombine/zext.ll +++ b/test/Transforms/InstCombine/zext.ll @@ -1,33 +1,11 @@ ; Tests to make sure elimination of casts is working correctly -; RUN: opt %s -instcombine -S | \ -; RUN: notcast {} {%c1.*} +; RUN: opt < %s -instcombine -S | FileCheck %s define i64 @test_sext_zext(i16 %A) { %c1 = zext i16 %A to i32 ; [#uses=1] %c2 = sext i32 %c1 to i64 ; [#uses=1] ret i64 %c2 +; CHECK-NOT: %c1 +; CHECK: %c2 = zext i16 %A to i64 +; CHECK: ret i64 %c2 } - -; PR3599 -define i32 @test2(i64 %tmp) nounwind readnone { -entry: - %tmp5 = trunc i64 %tmp to i8 ; [#uses=1] - %tmp7 = lshr i64 %tmp, 8 ; [#uses=1] - %tmp8 = trunc i64 %tmp7 to i8 ; [#uses=1] - %tmp10 = lshr i64 %tmp, 16 ; [#uses=1] - %tmp11 = trunc i64 %tmp10 to i8 ; [#uses=1] - %tmp13 = lshr i64 %tmp, 24 ; [#uses=1] - %tmp14 = trunc i64 %tmp13 to i8 ; [#uses=1] - %tmp1 = zext i8 %tmp5 to i32 ; [#uses=1] - %tmp2 = zext i8 %tmp8 to i32 ; [#uses=1] - %tmp3 = shl i32 %tmp2, 8 ; [#uses=1] - %tmp4 = zext i8 %tmp11 to i32 ; [#uses=1] - %tmp6 = shl i32 %tmp4, 16 ; [#uses=1] - %tmp9 = zext i8 %tmp14 to i32 ; [#uses=1] - %tmp12 = shl i32 %tmp9, 24 ; [#uses=1] - %tmp15 = or i32 %tmp12, %tmp1 ; [#uses=1] - %tmp16 = or i32 %tmp15, %tmp6 ; [#uses=1] - %tmp17 = or i32 %tmp16, %tmp3 ; [#uses=1] - ret i32 %tmp17 -} -