Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Test case:
- %vec = type <3 x float>
- define %vec @vecdiv( %vec %p1, %vec %p2)
- {
- %result = fdiv %vec %p1, %p2
- ret %vec %result
- }
- (With different vector lengths)
- Behavior of current DAGTypeLegalizer::WidenVecRes_Binary on x86-64:
- <3 x float>: widen to 4:
- concat(fdiv:v2f32, insert(undef:v2f32, fdiv:f32)) RIGHT, but yields incorrect code (bug elsewhere)
- <5 x float>: widen to 8:
- concat(fdiv:v4f32, insert(v2f32, fdiv:f32), undef:v2f32, undef:v2f32) WRONG, but works (accident?).
- <6 x float>: widen to 8:
- concat(fdiv:v4f32, fdiv:v2f32, undef:v2f32, undef:v2f32) WRONG, produces wrong result
- <7 x float>: widen to 8:
- concat(fdiv:v4f32, fdiv:v2f32, insert(fdiv:f32):v2f32, undef:v2f32) WRONG, wrong result
- <9 x float>: widen to 16:
- concat(fdiv:v4f32, fdiv:v4f32, insert(fdiv:f32):v2f32, undef:v4f32) WRONG, assert blows
- <10 x float>: widen to 16:
- concat(fdiv:v4f32, fdiv:v4f32, concat(fdiv:v2f32, undef:v2f32):v4f32, undef:v4f32) RIGHT, right result
- <11 x float>: widen to 16:
- concat(fdiv:v4f32, fdiv:v4f32, concat(fdiv:v2f32, insert(undef:v2f32, 1 x fdiv:f32)) RIGHT, right result
- <12 x float>: widen to 16:
- concat(fdiv:v4f32, fdiv:v4f32, fdiv:v4f32, undef:v4f32), RIGHT, right result
- <13 x float>: widen to 16:
- concat(fdiv:v4f32, fdiv:v4f32, fdiv:v4f32, insert(undef:v2f32, 1x fdiv:f32)) WRONG, assert blows
- <14 x float>: widen to 16:
- concat(fdiv:v4f32, fdiv:v4f32, fdiv:v4f32, concat(fdiv:v2f32, undef:v2f32)) RIGHT, right result
- <15 x float>: widen to 16:
- concat(fdiv:v4f32, fdiv:v4f32, fdiv:v4f32, concat(fdiv:v2f32, insert(undef:v2f32, 1x fdiv:f32))) RIGHT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement