[llvm-bugs] [Bug 44067] New: [SLPVectorizer] Generation of seed operands in the wrong order for insertelement.
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Nov 19 12:21:16 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=44067
Bug ID: 44067
Summary: [SLPVectorizer] Generation of seed operands in the
wrong order for insertelement.
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: v.porpodas at gmail.com
CC: a.bataev at hotmail.com, anton.a.afanasyev at gmail.com,
llvm-bugs at lists.llvm.org, llvm-dev at redking.me.uk,
spatel+llvm at rotateright.com
There seems to be a bug in findBuildVector() when the insertelement
instructions are not in increasing index order.
For example:
%Ins1 = insertelement <2 x float> undef, float %Elem1, i32 1 ; NOTE: index=1
%Ins0 = insertelement <2 x float> %Ins1, float %Elem0, i32 0 ; NOTE: index=0
This generates a seed vector of %Elem1, %Elem0, but it should generate the
reverse: %Elem0, %Elem1.
Test:
----
define dso_local <2 x float> @foo({{float, float}}* %A, float %B) {
entry:
%0 = bitcast {{float, float}}* %A to <2 x float>*
%1 = load <2 x float>, <2 x float>* %0
%L0 = extractelement <2 x float> %1, i32 0
%L1 = extractelement <2 x float> %1, i32 1
%Mul0 = fmul float %L0, 2.000000e+00
%Mul1 = fmul float %L1, 2.000000e+00
%Ins1 = insertelement <2 x float> undef, float %Mul1, i32 1
%Ins0 = insertelement <2 x float> %Ins1, float %Mul0, i32 0
ret <2 x float> %Ins0
}
Compile:
----
opt -slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu test.ll
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191119/20302421/attachment.html>
More information about the llvm-bugs
mailing list