mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
93a3ca7cde
Summary: This fixes PR27617. Bug description: The SLPVectorizer asserts on encountering GEPs with different index types, such as i8 and i64. The patch includes a simple relaxation of the assert to allow constants being of different types, along with a regression test that will provoke the unrelaxed assert. Reviewers: nadav, mzolotukhin Subscribers: JesperAntonsson, llvm-commits, mzolotukhin Differential Revision: http://reviews.llvm.org/D20685 Patch by Jesper Antonsson! llvm-svn: 272206
23 lines
537 B
LLVM
23 lines
537 B
LLVM
; RUN: opt < %s -S -slp-vectorizer
|
|
|
|
; This code has GEPs with different index types, which should not
|
|
; matter for the SLPVectorizer.
|
|
|
|
target triple = "x86_64--linux"
|
|
|
|
define void @foo() {
|
|
entry:
|
|
br label %bb1
|
|
|
|
bb1:
|
|
%ls1.ph = phi float* [ %_tmp1, %bb1 ], [ undef, %entry ]
|
|
%ls2.ph = phi float* [ %_tmp2, %bb1 ], [ undef, %entry ]
|
|
store float undef, float* %ls1.ph
|
|
%_tmp1 = getelementptr float, float* %ls1.ph, i32 1
|
|
%_tmp2 = getelementptr float, float* %ls2.ph, i64 4
|
|
br i1 false, label %bb1, label %bb2
|
|
|
|
bb2:
|
|
ret void
|
|
}
|