[llvm] [LoongArch] Lower ANY_EXTEND to ZERO_EXTEND under LASX to avoid scalarization (PR #201099)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 6 01:45:20 PDT 2026
================
@@ -1024,6 +1026,18 @@ SDValue LoongArchTargetLowering::lowerSIGN_EXTEND_VECTOR_INREG(
return SDValue();
}
+// ANY_EXTEND can be replaced by ZERO_EXTEND when LASX is enabled.
+SDValue LoongArchTargetLowering::lowerANY_EXTEND(SDValue Op,
+ SelectionDAG &DAG) const {
+ SDLoc DL(Op);
+ if (!Subtarget.hasExtLASX())
+ return SDValue();
----------------
wangleiat wrote:
Replace the `if` with an `assert`; this function should only be called when `hasExtLASX()` is true.
https://github.com/llvm/llvm-project/pull/201099
More information about the llvm-commits
mailing list