[PATCH] D142546: [ConstraintElimination] Decompose or instruction if the constant operand < 2^known_zero_bits of the first operand.
Zain Jaffal via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 20 08:04:11 PST 2023
zjaffal marked 4 inline comments as done.
zjaffal added inline comments.
================
Comment at: llvm/test/Transforms/ConstraintElimination/or.ll:534-535
; CHECK-NEXT: [[START_4:%.*]] = or i8 [[START]], 4
; CHECK-NEXT: [[T_4:%.*]] = icmp ule i8 [[START_4]], [[HIGH]]
; CHECK-NEXT: call void @use(i1 [[T_4]])
; CHECK-NEXT: [[START_5:%.*]] = or i8 [[START]], 5
----------------
This transformation should be true
https://alive2.llvm.org/ce/z/xvrMtA
`hasNoCommonBits` doesn't optimise it while the original implementation did
================
Comment at: llvm/test/Transforms/ConstraintElimination/or.ll:610-611
; CHECK-NEXT: [[START_4:%.*]] = or i8 [[START]], 4
; CHECK-NEXT: [[F_4:%.*]] = icmp ugt i8 [[START_4]], [[HIGH]]
; CHECK-NEXT: call void @use(i1 [[F_4]])
; CHECK-NEXT: [[START_5:%.*]] = or i8 [[START]], 5
----------------
this check should be false
https://alive2.llvm.org/ce/z/9-7sJR
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142546/new/
https://reviews.llvm.org/D142546
More information about the llvm-commits
mailing list