[PATCH] D130605: [InstCombine] Add baseline tests for redundant sign bits count folds
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 27 00:39:53 PDT 2022
nikic added a comment.
Also need a negative test where the operand of the ashr and xor is not the same.
================
Comment at: llvm/test/Transforms/InstCombine/icmp.ll:4169
+; CHECK-NEXT: [[Y:%.*]] = ashr i32 [[X:%.*]], 31
+; CHECK-NEXT: [[Z:%.*]] = xor i32 [[Y]], [[X]]
+; CHECK-NEXT: [[C:%.*]] = icmp ult i32 [[Z]], 1073741824
----------------
Grep for "thward complexity-based canonicalization" for how to avoid this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130605/new/
https://reviews.llvm.org/D130605
More information about the llvm-commits
mailing list