================
@@ -4344,16 +4301,19 @@ static Constant *ConstantFoldScalarCall3(StringRef Name,
const bool IsFMul = IntrinsicID == Intrinsic::nvvm_fmul ||
IntrinsicID == Intrinsic::nvvm_fmul_ftz;
if (IsFAdd || IsFMul) {
+ APFloat::roundingMode RoundMode =
+ nvvm::GetRoundingModeFromImmArg(Operands[2]);
+ // Do not fold combinations that codegen rejects.
+ if (!nvvm::FPArithIsSupported(IntrinsicID, Ty, RoundMode))
----------------
Wolfram70 wrote:
Makes sense, moved these checks to `VerifierNVVM.cpp` in the latest revision.
Thanks!
https://github.com/llvm/llvm-project/pull/232672
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits