[PATCH] D96388: [AArch64][GlobalISel] Fold G_ADD into the cset for G_ICMP
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 10 10:42:02 PST 2021
paquette added inline comments.
================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:2181
+ Cmp->getOperand(1), MIRBuilder);
+ emitCSetForICMP(I.getOperand(0).getReg(), Pred, MIRBuilder, X);
+ I.eraseFromParent();
----------------
aemerson wrote:
> What if the type is s64? emitCSetForICMP seems to only work for s32.
I don't //think// that should happen, because G_ICMP can only output a s32. So, any G_ADD fed by it should take in + produce a s32.
That being said, it's probably better to early exit if we don't have a s32 anyway.
(And maybe emitCSetForICMP should be changed to a general purpose emitCSet function.)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96388/new/
https://reviews.llvm.org/D96388
More information about the llvm-commits
mailing list