diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2016-02-24 16:34:29 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2016-02-24 16:34:29 +0000 |
| commit | 3a74fb51afbfb291a7c230c72519af280612fc4f (patch) | |
| tree | 7ad087c1b5d3ef626eb13a20fa7c4ee75f3f161a /llvm | |
| parent | a4e35f7092a34dba2649753663902dc589f83ea3 (diff) | |
| download | bcm5719-llvm-3a74fb51afbfb291a7c230c72519af280612fc4f.tar.gz bcm5719-llvm-3a74fb51afbfb291a7c230c72519af280612fc4f.zip | |
add test to show missing bitcasted vector xor fold
llvm-svn: 261748
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/bitcast.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/bitcast.ll b/llvm/test/Transforms/InstCombine/bitcast.ll index bccd19cc32e..9fcb092f6ac 100644 --- a/llvm/test/Transforms/InstCombine/bitcast.ll +++ b/llvm/test/Transforms/InstCombine/bitcast.ll @@ -16,6 +16,21 @@ define i32 @test1(i64 %a) { ; CHECK: ret i32 0 } +; FIXME: The bitcasts of the operands to the xor can be eliminated. + +define <2 x i32> @xor_two_vector_bitcasts(<1 x i64> %a, <1 x i64> %b) { + %t1 = bitcast <1 x i64> %a to <2 x i32> + %t2 = bitcast <1 x i64> %b to <2 x i32> + %t3 = xor <2 x i32> %t1, %t2 + ret <2 x i32> %t3 + +; CHECK-LABEL: @xor_two_vector_bitcasts( +; CHECK-NEXT: %t1 = bitcast <1 x i64> %a to <2 x i32> +; CHECK-NEXT: %t2 = bitcast <1 x i64> %b to <2 x i32> +; CHECK-NEXT: %t3 = xor <2 x i32> %t1, %t2 +; CHECK-NEXT: ret <2 x i32> %t3 +} + ; Optimize bitcasts that are extracting low element of vector. This happens ; because of SRoA. ; rdar://7892780 |

