Index: llvm/lib/Target/AMDGPU/VOP1Instructions.td
===================================================================
--- llvm/lib/Target/AMDGPU/VOP1Instructions.td
+++ llvm/lib/Target/AMDGPU/VOP1Instructions.td
@@ -50,8 +50,7 @@
let ReadsModeReg = !or(isFloatType
.ret, isFloatType.ret);
- // FIXME
- // let mayRaiseFPException = ReadsModeReg;
+ let mayRaiseFPException = ReadsModeReg;
let VOP1 = 1;
let VALU = 1;
Index: llvm/lib/Target/AMDGPU/VOP2Instructions.td
===================================================================
--- llvm/lib/Target/AMDGPU/VOP2Instructions.td
+++ llvm/lib/Target/AMDGPU/VOP2Instructions.td
@@ -71,8 +71,7 @@
let ReadsModeReg = !or(isFloatType.ret, isFloatType.ret);
- // FIXME: Set this
- // let mayRaiseFPException = ReadsModeReg;
+ let mayRaiseFPException = ReadsModeReg;
let VOP2 = 1;
let VALU = 1;
@@ -489,12 +488,14 @@
defm V_OR_B32 : VOP2Inst <"v_or_b32", VOP_PAT_GEN, or>;
defm V_XOR_B32 : VOP2Inst <"v_xor_b32", VOP_PAT_GEN, xor>;
+let mayRaiseFPException = 0 in {
let Constraints = "$vdst = $src2", DisableEncoding="$src2",
isConvertibleToThreeAddress = 1 in {
defm V_MAC_F32 : VOP2Inst <"v_mac_f32", VOP_MAC_F32>;
}
def V_MADAK_F32 : VOP2_Pseudo <"v_madak_f32", VOP_MADAK_F32, []>;
+}
// No patterns so that the scalar instructions are always selected.
// The scalar versions will be replaced with vector when needed later.
@@ -633,7 +634,11 @@
defm V_SUB_F16 : VOP2Inst <"v_sub_f16", VOP_F16_F16_F16, fsub>;
defm V_SUBREV_F16 : VOP2Inst <"v_subrev_f16", VOP_F16_F16_F16, null_frag, "v_sub_f16">;
defm V_MUL_F16 : VOP2Inst <"v_mul_f16", VOP_F16_F16_F16, fmul>;
+
+let mayRaiseFPException = 0 in {
def V_MADAK_F16 : VOP2_Pseudo <"v_madak_f16", VOP_MADAK_F16, [], "">;
+}
+
} // End FPDPRounding = 1
defm V_ADD_U16 : VOP2Inst <"v_add_u16", VOP_I16_I16_I16_ARITH, add>;
defm V_SUB_U16 : VOP2Inst <"v_sub_u16" , VOP_I16_I16_I16_ARITH, sub>;
Index: llvm/lib/Target/AMDGPU/VOP3Instructions.td
===================================================================
--- llvm/lib/Target/AMDGPU/VOP3Instructions.td
+++ llvm/lib/Target/AMDGPU/VOP3Instructions.td
@@ -228,6 +228,7 @@
class VOP3Interp pattern = []> :
VOP3_Pseudo {
let AsmMatchConverter = "cvtVOP3Interp";
+ let mayRaiseFPException = 0;
}
def VOP3_INTERP : VOPProfile<[f32, f32, i32, untyped]> {
Index: llvm/lib/Target/AMDGPU/VOPInstructions.td
===================================================================
--- llvm/lib/Target/AMDGPU/VOPInstructions.td
+++ llvm/lib/Target/AMDGPU/VOPInstructions.td
@@ -122,9 +122,7 @@
let ReadsModeReg = !or(isFloatType.ret, isFloatType.ret);
- // FIXME: Set this. Right now it seems regular IR operations don't
- // automatically imply no FP exceptions.
- // let mayRaiseFPException = ReadsModeReg;
+ let mayRaiseFPException = ReadsModeReg;
let Uses = !if(ReadsModeReg, [MODE, EXEC], [EXEC]);
let AsmVariantName = AMDGPUAsmVariants.VOP3;
@@ -500,9 +498,7 @@
let ReadsModeReg = !or(isFloatType.ret, isFloatType.ret);
- // FIXME: Set this. Right now it seems regular IR operations don't
- // automatically imply no FP exceptions.
- // let mayRaiseFPException = ReadsModeReg;
+ let mayRaiseFPException = ReadsModeReg;
let Uses = !if(ReadsModeReg, [MODE, EXEC], [EXEC]);
let SubtargetPredicate = HasSDWA;
@@ -623,9 +619,7 @@
let ReadsModeReg = !or(isFloatType.ret, isFloatType.ret);
- // FIXME: Set this. Right now it seems regular IR operations don't
- // automatically imply no FP exceptions.
- // let mayRaiseFPException = ReadsModeReg;
+ let mayRaiseFPException = ReadsModeReg;
let Uses = !if(ReadsModeReg, [MODE, EXEC], [EXEC]);
let isConvergent = 1;