aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-07 23:41:00 +0000
committerChris Lattner <sabre@nondot.org>2010-01-07 23:41:00 +0000
commit075f6929393de708fbebbba053d2562d05ff0ce0 (patch)
tree73262694dc715d1b1738be15ce648554f8efb93b /test
parentbd1fccfad59f24267b6fa8b898711d63a3574c7d (diff)
downloadexternal_llvm-075f6929393de708fbebbba053d2562d05ff0ce0.zip
external_llvm-075f6929393de708fbebbba053d2562d05ff0ce0.tar.gz
external_llvm-075f6929393de708fbebbba053d2562d05ff0ce0.tar.bz2
Enhance instcombine to reason more strongly about promoting computation
that feeds into a zext, similar to the patch I did yesterday for sext. There is a lot of room for extension beyond this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92962 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/cast.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/cast.ll b/test/Transforms/InstCombine/cast.ll
index 10e5050..b6dc464 100644
--- a/test/Transforms/InstCombine/cast.ll
+++ b/test/Transforms/InstCombine/cast.ll
@@ -392,3 +392,14 @@ define zeroext i64 @test43(i8 zeroext %on_off) nounwind readonly {
; CHECK-NEXT: %B = add i64 %A, -1
; CHECK-NEXT: ret i64 %B
}
+
+define i64 @test44(i8 %T) {
+ %A = zext i8 %T to i16
+ %B = or i16 %A, 1234
+ %C = zext i16 %B to i64
+ ret i64 %C
+; CHECK: @test44
+; CHECK-NEXT: %A = zext i8 %T to i64
+; CHECK-NEXT: %B = or i64 %A, 1234
+; CHECK-NEXT: ret i64 %B
+}