File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -371,6 +371,22 @@ class YkIRWriter {
371371 unsigned &InstIdx) {
372372 assert (I->getNumOperands () == 2 );
373373
374+ // We don't yet support:
375+ // - fast math flags (for float operations).
376+ // - the `exact` keyword
377+ // - vector variants
378+ if ((isa<FPMathOperator>(I) && (I->getFastMathFlags ().any ())) ||
379+ (isa<PossiblyExactOperator>(I) && I->isExact ()) ||
380+ I->getType ()->isVectorTy ()) {
381+ serialiseUnimplementedInstruction (I, FLCtxt, BBIdx, InstIdx);
382+ return ;
383+ }
384+
385+ // Note that we do nothing with the `nsw` and `nuw` (no {signed,unsigned}
386+ // wrap) keywords, which may generate poison values. If they do, the rules
387+ // of deferred UB allow us to make any value we wish, including (as
388+ // we do) the wrapped value.
389+
374390 // opcode:
375391 serialiseOpcode (OpCodeBinOp);
376392 // left-hand side:
@@ -386,9 +402,6 @@ class YkIRWriter {
386402
387403 // Serialise a binary operator.
388404 void serialiseBinOperator (Instruction::BinaryOps BO) {
389- // operand kind:
390- // OutStreamer.emitInt8(OperandKind::OpKindBinOp);
391- // the operator:
392405 switch (BO) {
393406 case Instruction::BinaryOps::Add:
394407 OutStreamer.emitInt8 (BinOp::BinOpAdd);
You can’t perform that action at this time.
0 commit comments