@@ -66,12 +66,13 @@ class FpBinOp final : public Instr {
6666 Op op;
6767 FastMathFlags fmath;
6868 FpRoundingMode rm;
69+ FpExceptionMode ex;
6970
7071public:
7172 FpBinOp (Type &type, std::string &&name, Value &lhs, Value &rhs, Op op,
72- FastMathFlags fmath, FpRoundingMode rm = {})
73+ FastMathFlags fmath, FpRoundingMode rm = {}, FpExceptionMode ex = {} )
7374 : Instr(type, std::move(name)), lhs(&lhs), rhs(&rhs), op(op), fmath(fmath),
74- rm (rm) {}
75+ rm (rm), ex(ex) {}
7576
7677 std::vector<Value*> operands () const override ;
7778 bool propagatesPoison () const override ;
@@ -120,11 +121,14 @@ class FpUnaryOp final : public Instr {
120121 Op op;
121122 FastMathFlags fmath;
122123 FpRoundingMode rm;
124+ FpExceptionMode ex;
123125
124126public:
125127 FpUnaryOp (Type &type, std::string &&name, Value &val, Op op,
126- FastMathFlags fmath, FpRoundingMode rm = {})
127- : Instr(type, std::move(name)), val(&val), op(op), fmath(fmath), rm(rm) {}
128+ FastMathFlags fmath, FpRoundingMode rm = {},
129+ FpExceptionMode ex = {})
130+ : Instr(type, std::move(name)), val(&val), op(op), fmath(fmath), rm(rm),
131+ ex (ex) {}
128132
129133 std::vector<Value*> operands () const override ;
130134 bool propagatesPoison () const override ;
@@ -193,12 +197,14 @@ class FpTernaryOp final : public Instr {
193197 Op op;
194198 FastMathFlags fmath;
195199 FpRoundingMode rm;
200+ FpExceptionMode ex;
196201
197202public:
198203 FpTernaryOp (Type &type, std::string &&name, Value &a, Value &b, Value &c,
199- Op op, FastMathFlags fmath, FpRoundingMode rm = {})
204+ Op op, FastMathFlags fmath, FpRoundingMode rm = {},
205+ FpExceptionMode ex = {})
200206 : Instr(type, std::move(name)), a(&a), b(&b), c(&c), op(op), fmath(fmath),
201- rm (rm) {}
207+ rm (rm), ex(ex) {}
202208
203209 std::vector<Value*> operands () const override ;
204210 bool propagatesPoison () const override ;
@@ -243,11 +249,12 @@ class FpConversionOp final : public Instr {
243249 Value *val;
244250 Op op;
245251 FpRoundingMode rm;
252+ FpExceptionMode ex;
246253
247254public:
248255 FpConversionOp (Type &type, std::string &&name, Value &val, Op op,
249- FpRoundingMode rm = {})
250- : Instr(type, std::move(name)), val(&val), op(op), rm(rm) {}
256+ FpRoundingMode rm = {}, FpExceptionMode ex = {} )
257+ : Instr(type, std::move(name)), val(&val), op(op), rm(rm), ex(ex) {}
251258
252259 std::vector<Value*> operands () const override ;
253260 bool propagatesPoison () const override ;
0 commit comments