[PATCH] D118118: [SDAG] Preserve unpredictable metadata, teach X86CmovConversion to respect this metadata
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 22 11:08:52 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/X86/X86CmovConversion.cpp:309
+
+ // If cmov instruction is marked as unpredicatable, do not convert it to
+ // branch.
----------------
unpredictable*
================
Comment at: llvm/lib/Target/X86/X86CmovConversion.cpp:312
+ if (I.getFlag(MachineInstr::MIFlag::Unpredictable))
+ continue;
+
----------------
xbolva00 wrote:
> nikic wrote:
> > Is it safe to just skip it entirely, or do we need to treat it as a non-cmov instruction?
> Good point, I am not sure, probably we should threat it that way.
>
> @RKSimon / @craig.topper any suggestions?
What instructions can this flag appear on? There's a check later for instructions that define EFLAGS we can't skip that check.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118118/new/
https://reviews.llvm.org/D118118
More information about the llvm-commits
mailing list