HomePhabricator

Assumption that "VectorizedValue" will always be an Instruction is not correct.

Authored by Suyog Sarda <suyog.sarda@samsung.com> on Jan 9 2015, 2:23 AM.

Description

Assumption that "VectorizedValue" will always be an Instruction is not correct. It can be a constant or a vector argument.

ex :

define i32 @hadd(<4 x i32> %a) #0 {
entry:

%vecext = extractelement <4 x i32> %a, i32 0
%vecext1 = extractelement <4 x i32> %a, i32 1
%add = add i32 %vecext, %vecext1
%vecext2 = extractelement <4 x i32> %a, i32 2
%add3 = add i32 %add, %vecext2
%vecext4 = extractelement <4 x i32> %a, i32 3
%add5 = add i32 %add3, %vecext4
ret i32 %add5

}

llvm-svn: 225517

Event Timeline

Suyog Sarda <suyog.sarda@samsung.com> committed rG85d0473650a6: Assumption that "VectorizedValue" will always be an Instruction is not correct. (authored by Suyog Sarda <suyog.sarda@samsung.com>).Jan 9 2015, 2:23 AM