[PATCH] D104037: [X86] Check immediate before get it.
Pengfei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 11 01:53:25 PDT 2021
pengfei accepted this revision.
pengfei added a comment.
This revision is now accepted and ready to land.
LGTM but let's wait one or two days to see opinions from others.
================
Comment at: llvm/lib/Target/X86/X86InstrInfo.cpp:6410
case X86::CMP8ri: {
MachineOperand &MO0 = DataMI->getOperand(0);
MachineOperand &MO1 = DataMI->getOperand(1);
----------------
craig.topper wrote:
> pengfei wrote:
> > But `CMP64mi32` shouldn't go to here.
> The CMPmi32 will be expanded to a load and CMPri32. This switches use the opcode after it's expanded.
Thanks Craig.
Discussed with Yuanke offline, I understand the fix here is to handle `relocImm`, i.e., `@a` in the example.
I think it makes sense to skip it here since we don't know it's value at this point.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104037/new/
https://reviews.llvm.org/D104037
More information about the llvm-commits
mailing list