diff --git a/llvm/test/Bitcode/constexpr-scalable-vector-gep.ll b/llvm/test/Bitcode/constexpr-scalable-vector-gep.ll new file mode 100644 index 0000000000000..edcb4773e4166 --- /dev/null +++ b/llvm/test/Bitcode/constexpr-scalable-vector-gep.ll @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llvm-dis -expand-constant-exprs | FileCheck %s +; RUN: llvm-dis -expand-constant-exprs < %s.bc | FileCheck %s + +@g = extern_weak global [32 x i8] + +define ptr @test_scalable_vector_gep() { +; CHECK-LABEL: define ptr @test_scalable_vector_gep() { +; CHECK-NEXT: %constexpr = getelementptr , ptr @g, i64 1 +; CHECK-NEXT: ret ptr %constexpr + ret ptr getelementptr (, ptr @g, i64 1) +} diff --git a/llvm/test/Bitcode/constexpr-scalable-vector-gep.ll.bc b/llvm/test/Bitcode/constexpr-scalable-vector-gep.ll.bc new file mode 100644 index 0000000000000..de80a0e554d7c Binary files /dev/null and b/llvm/test/Bitcode/constexpr-scalable-vector-gep.ll.bc differ