File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 1313#include " llvm/IR/Instructions.h"
1414#include " llvm/IR/Intrinsics.h"
1515#include " llvm/IR/Module.h"
16+ #include " llvm/IR/Operator.h"
1617#include " llvm/MC/MCContext.h"
1718#include " llvm/MC/MCSectionELF.h"
1819#include " llvm/MC/MCStreamer.h"
@@ -632,6 +633,19 @@ class YkIRWriter {
632633
633634 void serialiseGetElementPtrInst (GetElementPtrInst *I, FuncLowerCtxt &FLCtxt,
634635 unsigned BBIdx, unsigned &InstIdx) {
636+ // We yet don't support:
637+ // - the `inrange` keyword.
638+ // - the vector variant.
639+ //
640+ // It appears that `inrange` can't appear in a GEP *instruction* (only a
641+ // GEP expression, inline in another instruction), but we check for it
642+ // anyway.
643+ if ((cast<GEPOperator>(I)->getInRangeIndex () != nullopt ) ||
644+ (I->getPointerOperand ()->getType ()->isVectorTy ())) {
645+ serialiseUnimplementedInstruction (I, FLCtxt, BBIdx, InstIdx);
646+ return ;
647+ }
648+
635649 // opcode:
636650 serialiseOpcode (OpCodePtrAdd);
637651 // type_idx:
You can’t perform that action at this time.
0 commit comments