aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine
diff options
context:
space:
mode:
authorMichael Ilseman <milseman@apple.com>2013-02-11 21:41:44 +0000
committerMichael Ilseman <milseman@apple.com>2013-02-11 21:41:44 +0000
commit9c213cc3c31da04a08a8e00a3395ac33d3d18536 (patch)
treedffeb85fad955ab9ec126b37e41ea2998431807f /test/Transforms/InstCombine
parent71490fa946f750fb3afe7228a32d31d401d4c1d8 (diff)
Optimization: bitcast (<1 x ...> insertelement ..., X, ...) to ... ==> bitcast X to ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174905 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine')
-rw-r--r--test/Transforms/InstCombine/bitcast.ll8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/bitcast.ll b/test/Transforms/InstCombine/bitcast.ll
index c980b8926c..1e6113256b 100644
--- a/test/Transforms/InstCombine/bitcast.ll
+++ b/test/Transforms/InstCombine/bitcast.ll
@@ -137,4 +137,10 @@ define i32 @All111(i32 %in) {
; CHECK: ret i32 0
}
-
+define <2 x i16> @BitcastInsert(i32 %a) {
+ %v = insertelement <1 x i32> undef, i32 %a, i32 0
+ %r = bitcast <1 x i32> %v to <2 x i16>
+ ret <2 x i16> %r
+; CHECK: @BitcastInsert
+; CHECK: bitcast i32 %a to <2 x i16>
+}