aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms
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
parent71490fa946f750fb3afe7228a32d31d401d4c1d8 (diff)
downloadexternal_llvm-9c213cc3c31da04a08a8e00a3395ac33d3d18536.zip
external_llvm-9c213cc3c31da04a08a8e00a3395ac33d3d18536.tar.gz
external_llvm-9c213cc3c31da04a08a8e00a3395ac33d3d18536.tar.bz2
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')
-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 c980b89..1e61132 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>
+}