[llvm] 04a29a3 - [Bitcode] Add test for constant scalable vector gep.

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 10:40:28 PST 2023


Author: Paul Walker
Date: 2023-03-06T18:34:32Z
New Revision: 04a29a3d5161ef0bda890abd0cbc086a538ff780

URL: https://github.com/llvm/llvm-project/commit/04a29a3d5161ef0bda890abd0cbc086a538ff780
DIFF: https://github.com/llvm/llvm-project/commit/04a29a3d5161ef0bda890abd0cbc086a538ff780.diff

LOG: [Bitcode] Add test for constant scalable vector gep.

Added: 
    llvm/test/Bitcode/constexpr-scalable-vector-gep.ll
    llvm/test/Bitcode/constexpr-scalable-vector-gep.ll.bc

Modified: 
    

Removed: 
    


################################################################################
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 000000000000..edcb4773e416
--- /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
+
+ at 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 <vscale x 1 x i8>, ptr @g, i64 1
+; CHECK-NEXT: ret ptr %constexpr
+  ret ptr getelementptr (<vscale x 1 x i8>, 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 000000000000..de80a0e554d7
Binary files /dev/null and b/llvm/test/Bitcode/constexpr-scalable-vector-gep.ll.bc 
diff er


        


More information about the llvm-commits mailing list