summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/CPP/gep.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/CPP/gep.ll b/llvm/test/CodeGen/CPP/gep.ll
new file mode 100644
index 00000000000..88a0bf1f216
--- /dev/null
+++ b/llvm/test/CodeGen/CPP/gep.ll
@@ -0,0 +1,10 @@
+; RUN: llc -march=cpp -o - %s | FileCheck %s
+
+define void @f1(i32* %addr) {
+ %x = getelementptr i32, i32* %addr, i32 1
+; CHECK: ConstantInt* [[INT_1:.*]] = ConstantInt::get(mod->getContext(), APInt(32, StringRef("1"), 10));
+; CHECK: GetElementPtrInst::Create(IntegerType::get(mod->getContext(), 32), ptr_addr,
+; CHECK-NEXT: [[INT_1]]
+; CHECK-NEXT: }, "x", label_3);
+ ret void
+}
OpenPOWER on IntegriCloud