redundant direct move instructions generated
| Bugzilla Link | 28117 |
| Resolution | FIXED |
| Resolved on | Aug 14, 2017 12:18 |
| Version | trunk |
| OS | Windows NT |
| Reporter | LLVM Bugzilla Contributor |
| CC | @hfinkel,@lei137,@nemanjai |
Extended Description
This came up in the discussion on http://reviews.llvm.org/D21135
for
define double @test2(<2 x i64> %a) { entry: %0 = extractelement <2 x i64> %a, i32 0 %1 = sitofp i64 %0 to double ret double %1 }
we generate
xxswapd 0, 34 mfvsrd 3, 0 mtvsrd 0, 3 xscvsxddp 1, 0 blr
We probably need to look at all users of extractelement in DAGCombine, and make the right decision before we reach pattern matching. Perhaps peephole optimization won't work here, as we need information about all users of values in question.
Remainder patterns addressed in patch https://reviews.llvm.org/D35859.
This particular pattern is addressed in patch http://reviews.llvm.org/D21354. Perhaps patterns involving integers of other widths can be addressed in the future.
assigned to @lei137