File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 13
13
#include " llvm/IR/Instructions.h"
14
14
#include " llvm/IR/Intrinsics.h"
15
15
#include " llvm/IR/Module.h"
16
+ #include " llvm/IR/Operator.h"
16
17
#include " llvm/MC/MCContext.h"
17
18
#include " llvm/MC/MCSectionELF.h"
18
19
#include " llvm/MC/MCStreamer.h"
@@ -632,6 +633,19 @@ class YkIRWriter {
632
633
633
634
void serialiseGetElementPtrInst (GetElementPtrInst *I, FuncLowerCtxt &FLCtxt,
634
635
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
+
635
649
// opcode:
636
650
serialiseOpcode (OpCodePtrAdd);
637
651
// type_idx:
You can’t perform that action at this time.
0 commit comments