[PATCH] D124118: [Peephole-Opt] For one kind of test-after-add pattern, eliminates test if it's correct to do so.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 27 19:02:07 PDT 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/X86/X86InstrInfo.cpp:970
+// Returns true if SF is known to be zero after AndInstr executes.
+inline static bool isSFZero(const MachineInstr &AndInstr) {
----------------
I don't know if this is necessary. If the SUBREG_TO_REG was used, the sign bit of the full 64 bit value was provably zero during SelectionDAG. I hope any branch, setcc, cmov would have been folded away based on it.
Can't we just set NoSignFlag=true?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124118/new/
https://reviews.llvm.org/D124118
More information about the llvm-commits
mailing list