Closed Quuxplusone closed 14 years ago
Bugzilla Link | PR3056 |
Status | RESOLVED FIXED |
Importance | P normal |
Reported by | Brian Watt (bwatt@us.ibm.com) |
Reported on | 2008-11-12 09:59:13 -0800 |
Last modified on | 2010-02-22 12:56:15 -0800 |
Version | trunk |
Hardware | PC Linux |
CC | llvm-bugs@lists.llvm.org, scooter.phd@gmail.com |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
Only constant element extraction is currently implemented in the code.
Fixed by revision 59891.
Now producing IR as follows:
; ModuleID = 'test-float4'
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-
f32:32:32-f64:64:64-v128:128:128"
target triple = "ppc-unknown-linux-gnu"
define float @check(i32 %i) nounwind readnone {
entry:
%vecext = extractelement <4 x float> < float 1.000000e+00, float 2.000000e+00,
float 3.000000e+00, float 4.000000e+00 >, i32 %i ; <float> [#uses=1]
ret float %vecext
}
However, the resulting Cell SPU assembler code now produces:
.text
.section .rodata.cst16,"aM",@progbits,16
.align 4
.LCPI1_0:
.long 1065353216 # float 1.000000e+00
.long 1073741824 # float 2.000000e+00
.long 1077936128 # float 3.000000e+00
.long 1082130432 # float 4.000000e+00
.text
.align 3
.global check
.type check, @function
check:
lqa $4, .LCPI1_0
shli $3, $3, 2
ila $5, 66051
shlqbyi $3, $4, $3
shufb $3, $3, $3, $5
.Llabel1:
bi $lr
.size check,.-check
Which when compiled with spu-as, I produces an assembler warning
spu-as -g -o test-float4.o test-float4.s # test-float4.o
test-float4.s: Assembler messages:
test-float4.s:19: Warning: Treating '$3' as a symbol.
It appears to be warning that "shlqbyi $3, $4, $3" should have an immediate
value and not a register in the last operand.
As a result, I am reopening this bug. Sorry.
Typo in instruction mnemonic. Fixed.