[PATCH] D139068: [AArch64][SVE] Allow to lower WHILEop operations with constant operands to PTRUE
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 7 08:32:41 PST 2022
sdesmalen added a comment.
Thanks that's looking a lot better!
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:4602
+ NumActiveElems = IsSigned ? X.ssub_ov(Y, Overflow) : X.usub_ov(Y, Overflow);
+ if (Overflow)
+ return SDValue();
----------------
nit: add a newline before the if?
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:4605
+ if (IsEqual)
+ NumActiveElems += 1;
+
----------------
I guess this can still overflow right? I think you had the right code for that before, it only needed moving the `if (Overflow) return SDValue();` after the increment.
It would also be good to add a test for the overflow case (both signed and unsigned, and both 'less' and 'less or equal')
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139068/new/
https://reviews.llvm.org/D139068
More information about the llvm-commits
mailing list