[llvm] [NVPTX] pull in v2i32 build_vector through v2f32 bitcast (PR #153478)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 13 13:02:26 PDT 2025
================
@@ -5334,6 +5335,26 @@ static SDValue PerformANDCombine(SDNode *N,
return SDValue();
}
+static SDValue combineBitcast(SDNode *N, TargetLowering::DAGCombinerInfo &DCI) {
+ const SDValue &Input = N->getOperand(0);
+ const MVT FromVT = Input.getSimpleValueType();
+ const MVT ToVT = N->getSimpleValueType(0);
+ const SDLoc DL(N);
+
+ if (Input.getOpcode() != ISD::BUILD_VECTOR || ToVT != MVT::v2f32 ||
+ !(FromVT.isVector() &&
+ FromVT.getVectorNumElements() == ToVT.getVectorNumElements()))
+ return SDValue();
+
+ const MVT ToEltVT = ToVT.getVectorElementType();
----------------
AlexMaclean wrote:
Is this ever not going to be `f32`?
https://github.com/llvm/llvm-project/pull/153478
More information about the llvm-commits
mailing list