[PATCH] D101074: [X86] Canonicalize SGT/UGT compares with constants to use SGE/UGE to reduce the number of EFLAGs reads. (PR48760)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 17 08:41:22 PDT 2021
RKSimon added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:23472
if (Op0.getSimpleValueType().isInteger()) {
+ // Attempt to canonicalize SGT/UGT -> SGE/UGE compares with constant which
+ // reduces the number of EFLAGs reads. The equivalent for SLE/ULE -> SLT/ULT
----------------
craig.topper wrote:
> Should this be inside emitFlagsForSetcc? That way setcc+brcond works. LowerBRCOND doesn't call LowerSETCC.
Yes, I was hoping to move it inside TranslateX86CC later (see TODO) - as it felt like this caused far too many diffs as an initial patch - I'll can try again now that the SLT/ULT handling has been dropped.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101074/new/
https://reviews.llvm.org/D101074
More information about the llvm-commits
mailing list