diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2016-02-24 17:00:34 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2016-02-24 17:00:34 +0000 |
| commit | dbbaca0e1b5d9a6e36ffdf523c946f02fd6c2357 (patch) | |
| tree | 741a19906b698d01bdee771f340c914e79e556ea /llvm/test/Transforms/InstCombine | |
| parent | b508f520e7711873e002d0679af2988c6e62f431 (diff) | |
| download | bcm5719-llvm-dbbaca0e1b5d9a6e36ffdf523c946f02fd6c2357.tar.gz bcm5719-llvm-dbbaca0e1b5d9a6e36ffdf523c946f02fd6c2357.zip | |
[InstCombine] enable optimization of casted vector xor instructions
This is part of the payoff for the refactoring in:
http://reviews.llvm.org/rL261649
http://reviews.llvm.org/rL261707
In addition to removing a pile of duplicated code, the xor case was
missing the optimization for vector types because it checked
"SrcTy->isIntegerTy()" rather than "SrcTy->isIntOrIntVectorTy()"
like 'and' and 'or' were already doing.
This solves part of:
https://llvm.org/bugs/show_bug.cgi?id=26702
llvm-svn: 261750
Diffstat (limited to 'llvm/test/Transforms/InstCombine')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/bitcast.ll | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/test/Transforms/InstCombine/bitcast.ll b/llvm/test/Transforms/InstCombine/bitcast.ll index 9fcb092f6ac..c29f4edbc06 100644 --- a/llvm/test/Transforms/InstCombine/bitcast.ll +++ b/llvm/test/Transforms/InstCombine/bitcast.ll @@ -25,9 +25,8 @@ define <2 x i32> @xor_two_vector_bitcasts(<1 x i64> %a, <1 x i64> %b) { 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: %t31 = xor <1 x i64> %a, %b +; CHECK-NEXT: %t3 = bitcast <1 x i64> %t31 to <2 x i32> ; CHECK-NEXT: ret <2 x i32> %t3 } |

