diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-08-26 21:50:56 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-08-26 21:50:56 +0000 |
| commit | 7717c616bdef76c956b31632ce5b7429406004ea (patch) | |
| tree | 10a7b6b197ce92e87cf5a6c6f59e60b188d24073 /llvm/test/Transforms/InstCombine/bitcast.ll | |
| parent | 27c412320e09189dade1cde7e11932a849930edd (diff) | |
| download | bcm5719-llvm-7717c616bdef76c956b31632ce5b7429406004ea.tar.gz bcm5719-llvm-7717c616bdef76c956b31632ce5b7429406004ea.zip | |
rename test
llvm-svn: 112224
Diffstat (limited to 'llvm/test/Transforms/InstCombine/bitcast.ll')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/bitcast.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/bitcast.ll b/llvm/test/Transforms/InstCombine/bitcast.ll new file mode 100644 index 00000000000..4e9dfbb53b4 --- /dev/null +++ b/llvm/test/Transforms/InstCombine/bitcast.ll @@ -0,0 +1,14 @@ +; RUN: opt < %s -instcombine -S | grep {ret i32 0} +; PR4487 + +; Bitcasts between vectors and scalars are valid, despite being ill-advised. + +define i32 @test(i64 %a) { +bb20: + %t1 = bitcast i64 %a to <2 x i32> + %t2 = bitcast i64 %a to <2 x i32> + %t3 = xor <2 x i32> %t1, %t2 + %t4 = extractelement <2 x i32> %t3, i32 0 + ret i32 %t4 +} + |

