[llvm] [SelectionDAG][RISCV] Fix break of vnsrl pattern in issue #94265 (PR #95563)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 29 16:02:08 PDT 2024
================
@@ -1884,6 +1884,21 @@ bool RISCVTargetLowering::isTruncateFree(EVT SrcVT, EVT DstVT) const {
return (SrcBits == 64 && DestBits == 32);
}
+bool RISCVTargetLowering::isTruncateFree(SDValue Val, EVT VT2) const {
+ EVT SrcVT = Val.getValueType();
+ // free truncate from vnsrl and vnsra
+ if (Subtarget.hasStdExtV() &&
----------------
topperc wrote:
I'm late to this, but shouldn't this use hasVInstructions(). It's excluding Zve*.
https://github.com/llvm/llvm-project/pull/95563
More information about the llvm-commits
mailing list