summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/and.ll
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2017-02-03 21:43:34 +0000
committerSanjay Patel <spatel@rotateright.com>2017-02-03 21:43:34 +0000
commit73fc8ddb065112fbb7cad1453774ed96bbb7d6e3 (patch)
treeba2c3ab04aba252f1c73bad9b5a480c056530f0f /llvm/test/Transforms/InstCombine/and.ll
parent25324313325e906368fafd142bc6138c231e0b44 (diff)
downloadbcm5719-llvm-73fc8ddb065112fbb7cad1453774ed96bbb7d6e3.tar.gz
bcm5719-llvm-73fc8ddb065112fbb7cad1453774ed96bbb7d6e3.zip
[InstCombine] fix operand-complexity-based canonicalization (PR28296)
The code comments didn't match the code logic, and we didn't actually distinguish the fake unary (not/neg/fneg) operators from arguments. Adding another level to the weighting scheme provides more structure and can help simplify the pattern matching in InstCombine and other places. I fixed regressions that would have shown up from this change in: rL290067 rL290127 But that doesn't mean there are no pattern-matching logic holes left; some combines may just be missing regression tests. Should fix: https://llvm.org/bugs/show_bug.cgi?id=28296 Differential Revision: https://reviews.llvm.org/D27933 llvm-svn: 294049
Diffstat (limited to 'llvm/test/Transforms/InstCombine/and.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/and.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/Transforms/InstCombine/and.ll b/llvm/test/Transforms/InstCombine/and.ll
index 8a30de1c07d..da71880b9bd 100644
--- a/llvm/test/Transforms/InstCombine/and.ll
+++ b/llvm/test/Transforms/InstCombine/and.ll
@@ -176,7 +176,7 @@ define i8 @test16(i8 %A) {
define i8 @test17(i8 %X, i8 %Y) {
; CHECK-LABEL: @test17(
; CHECK-NEXT: [[Y_NOT:%.*]] = xor i8 %Y, -1
-; CHECK-NEXT: [[D:%.*]] = or i8 %X, [[Y_NOT]]
+; CHECK-NEXT: [[D:%.*]] = or i8 [[Y_NOT]], %X
; CHECK-NEXT: ret i8 [[D]]
;
%B = xor i8 %X, -1
OpenPOWER on IntegriCloud