Rahul Anand Radhakrishnan 18423c7e1f [SCCP] Do not attempt to create constexpr for a scalable vector GEP
Scalable vector GEPs are not constants and trying to create one for
these GEPs causes an assertion failure.

Reviewed By: nikic, paulwalker-arm

Differential Revision: https://reviews.llvm.org/D157590
2023-08-11 11:06:07 +00:00

12 lines
413 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=sccp -S | FileCheck %s
define ptr @scalable_vector_getelementptr(i64 %x) {
; CHECK-LABEL: @scalable_vector_getelementptr(
; CHECK-NEXT: [[PTR:%.*]] = getelementptr <vscale x 4 x i32>, ptr null, i64 1
; CHECK-NEXT: ret ptr [[PTR]]
;
%ptr = getelementptr <vscale x 4 x i32>, ptr null, i64 1
ret ptr %ptr
}