[llvm] [PowerPC] Extend folding RLWINM + RLWINM to post-RA. (PR #67293)

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 11:44:41 PDT 2023


================
@@ -160,8 +160,7 @@ define i32 @xvtdivdp_shift(<2 x double> %a, <2 x double> %b) {
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    xvtdivdp cr0, v2, v3
 ; CHECK-NEXT:    mfocrf r3, 128
-; CHECK-NEXT:    srwi r3, r3, 28
-; CHECK-NEXT:    rlwinm r3, r3, 28, 31, 31
+; CHECK-NEXT:    li r3, 0
----------------
nemanjai wrote:

This is less than ideal. We seem to be able to prove that the result of the `xvtdivdp` is unused, but we don't eliminate it or the move from CR - both expensive instructions.

https://github.com/llvm/llvm-project/pull/67293


More information about the llvm-commits mailing list