[llvm] [AArch64][GlobalISel] Take abs scalar codegen closer to SDAG (PR #84886)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 19 02:08:24 PDT 2024
================
@@ -515,6 +515,7 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
getActionDefinitionsBuilder(G_ICMP)
.legalFor({{s32, s32},
{s32, s64},
+ {s64, s64},
----------------
davemgreen wrote:
I believe this is the flags between the cmp+select. I'm not sure what the ramifications of making them i64 would be, but it might be better if we can keep them as i32 if we can, to avoid awkward cases like select(anyext(cmp(..)), ..).
The nodes should be re-visited until they are legal. It looks like G_SELECT isn't handling narrowScalar yet, probably because it hasn't come up before:
```
LegalizerHelper::LegalizeResult
LegalizerHelper::narrowScalarSelect(MachineInstr &MI, unsigned TypeIdx,
LLT NarrowTy) {
if (TypeIdx != 0)
return UnableToLegalize;
```
Hopefully if that is handled correctly for the icmp/sel, it will work better?
https://github.com/llvm/llvm-project/pull/84886
More information about the llvm-commits
mailing list