llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

redundant direct move instructions generated

Open llvmbot opened this issue 10 years ago • 3 comments

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.

llvmbot avatar Jun 14 '16 05:06 llvmbot

Remainder patterns addressed in patch https://reviews.llvm.org/D35859.

lei137 avatar Aug 14 '17 19:08 lei137

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.

nemanjai avatar Jun 14 '16 23:06 nemanjai

assigned to @lei137

llvmbot avatar Jun 14 '16 05:06 llvmbot