[PATCH] D124709: [InstCombine][NFC] Add baseline tests for folds of ((A&B)^C)|B
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 3 14:18:03 PDT 2022
alexander-shaposhnikov added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/and-xor-or.ll:206
+; CHECK-NEXT: [[TMP1:%.*]] = and i64 [[X:%.*]], [[Y:%.*]]
+; CHECK-NEXT: [[TMP2:%.*]] = xor i64 [[TMP1]], [[Z:%.*]]
+; CHECK-NEXT: [[TMP3:%.*]] = or i64 [[TMP2]], [[Y]]
----------------
nikic wrote:
> As you can see, InstCombine changes the order of the operations, so that your test is actually the same as and_xor_or1. Grep for "thwart complexity-based canonicalization" to see the right way to avoid this.
yeah, many thanks, I've also noticed this but I thought this interference was expected. Will fix it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124709/new/
https://reviews.llvm.org/D124709
More information about the llvm-commits
mailing list