[PATCH] D153394: [AArch64][GlobalISel] Selection support for v2s16 G_ANYEXT
Thorsten via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 8 01:30:01 PDT 2023
tschuett added a comment.
In D153394#4482586 <https://reviews.llvm.org/D153394#4482586>, @Allen wrote:
> In D153394#4452589 <https://reviews.llvm.org/D153394#4452589>, @dmgreen wrote:
>
>> If I'm reading the test correctly, then SDAG version is returning (as bytes) `0,0,0,0,1,0,0,0`. i.e the v2i16 is promoted to a v2i32. The GlobalISel version is returning `0,0,1,0,0,0,0,0`, as the v2i16 is widened to a v4i16.
>>
>> I don't think we can have a difference in the calling convention between the two, it would mean they are ABI incompatible. Either they both need to change to widen (which looks like a lot of work, including an ABI break for SDAG), or the GISel code need return values in the same way as SDAG does.
>
> Thanks, I find it seems to be an optimization in SDAG version. So GISel version needs to do something like
> SelectionDAG::FoldConstantArithmetic and TryToFoldExtendOfConstant for const vector constant ?
I believe that you are mixing optimizations with ABI. The SDAG has result has to win indepent of the inefficient GISel code.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153394/new/
https://reviews.llvm.org/D153394
More information about the llvm-commits
mailing list