Advertisement
Guest User

Untitled

a guest
May 28th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. Test case:
  2. %vec = type <3 x float>
  3. define %vec @vecdiv( %vec %p1, %vec %p2)
  4. {
  5. %result = fdiv %vec %p1, %p2
  6. ret %vec %result
  7. }
  8. (With different vector lengths)
  9.  
  10. Behavior of current DAGTypeLegalizer::WidenVecRes_Binary on x86-64:
  11.  
  12. <3 x float>: widen to 4:
  13. concat(fdiv:v2f32, insert(undef:v2f32, fdiv:f32)) RIGHT, but yields incorrect code (bug elsewhere)
  14. <5 x float>: widen to 8:
  15. concat(fdiv:v4f32, insert(v2f32, fdiv:f32), undef:v2f32, undef:v2f32) WRONG, but works (accident?).
  16. <6 x float>: widen to 8:
  17. concat(fdiv:v4f32, fdiv:v2f32, undef:v2f32, undef:v2f32) WRONG, produces wrong result
  18. <7 x float>: widen to 8:
  19. concat(fdiv:v4f32, fdiv:v2f32, insert(fdiv:f32):v2f32, undef:v2f32) WRONG, wrong result
  20. <9 x float>: widen to 16:
  21. concat(fdiv:v4f32, fdiv:v4f32, insert(fdiv:f32):v2f32, undef:v4f32) WRONG, assert blows
  22. <10 x float>: widen to 16:
  23. concat(fdiv:v4f32, fdiv:v4f32, concat(fdiv:v2f32, undef:v2f32):v4f32, undef:v4f32) RIGHT, right result
  24. <11 x float>: widen to 16:
  25. concat(fdiv:v4f32, fdiv:v4f32, concat(fdiv:v2f32, insert(undef:v2f32, 1 x fdiv:f32)) RIGHT, right result
  26. <12 x float>: widen to 16:
  27. concat(fdiv:v4f32, fdiv:v4f32, fdiv:v4f32, undef:v4f32), RIGHT, right result
  28. <13 x float>: widen to 16:
  29. concat(fdiv:v4f32, fdiv:v4f32, fdiv:v4f32, insert(undef:v2f32, 1x fdiv:f32)) WRONG, assert blows
  30. <14 x float>: widen to 16:
  31. concat(fdiv:v4f32, fdiv:v4f32, fdiv:v4f32, concat(fdiv:v2f32, undef:v2f32)) RIGHT, right result
  32. <15 x float>: widen to 16:
  33. 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