[PATCH] D136672: [ExpandMemCmp][AArch64] Add a new option PreferCmpToExpand in inMemCmpExpansionOptions and enable on AArch64
Allen zhong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 27 18:50:19 PDT 2022
Allen added a comment.
> I have rebase to the code already include D136244 <https://reviews.llvm.org/D136244>. These two tickets looks the same but it looks D136244 <https://reviews.llvm.org/D136244> can't fix the original case bcmp 3bytes.
> And not only AArch64, maybe this change also help some potential platform.
- For the case bcmp3, the combine pattern is mismatch as we restrict to **ISD::XOR**, so the **ISD::AND** may be enhanced too ?
(gdb) p LHS.getOperand(0)->getOpcode() == ISD::XOR && LHS.getOperand(1)->getOpcode() == ISD::XOR
$16 = false
(gdb) p LHS.dump()
t20: i32 = or t46, t50
$17 = void
(gdb) p LHS.getOperand(0).dump()
t46: i32 = and t44, Constant:i32<65535>
$18 = void
(gdb) p LHS.getOperand(1).dump()
t50: i32 = and t48, Constant:i32<255>
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136672/new/
https://reviews.llvm.org/D136672
More information about the llvm-commits
mailing list