File tree 1 file changed +16
-3
lines changed
1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -371,6 +371,22 @@ class YkIRWriter {
371
371
unsigned &InstIdx) {
372
372
assert (I->getNumOperands () == 2 );
373
373
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
+
374
390
// opcode:
375
391
serialiseOpcode (OpCodeBinOp);
376
392
// left-hand side:
@@ -386,9 +402,6 @@ class YkIRWriter {
386
402
387
403
// Serialise a binary operator.
388
404
void serialiseBinOperator (Instruction::BinaryOps BO) {
389
- // operand kind:
390
- // OutStreamer.emitInt8(OperandKind::OpKindBinOp);
391
- // the operator:
392
405
switch (BO) {
393
406
case Instruction::BinaryOps::Add:
394
407
OutStreamer.emitInt8 (BinOp::BinOpAdd);
You can’t perform that action at this time.
0 commit comments