[PATCH] D118118: [SDAG] Preserve unpredictable metadata, teach X86CmovConversion to respect this metadata
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 31 07:35:38 PDT 2023
xbolva00 marked an inline comment as done.
xbolva00 added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/MachineInstr.h:115
+ // this instruction.
+ Unpredictable = 1 << 16, // Instruction is unpredictable.
};
----------------
craig.topper wrote:
> I kind of think this description is overly short. Unpredictable for an instruction could mean many things.
Changed, feel free to suggest better description.
================
Comment at: llvm/lib/Target/X86/X86CmovConversion.cpp:312
+ if (I.getFlag(MachineInstr::MIFlag::Unpredictable))
+ continue;
+
----------------
craig.topper wrote:
> 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.
Select -> CMOV.
Okay, fixed and EFLAGS check is not skipped.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118118/new/
https://reviews.llvm.org/D118118
More information about the llvm-commits
mailing list