[llvm] a09140f - Revert "[PowerPC] Remove extra swap for extract+vperm on LE"
Amy Kwan via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 25 10:35:06 PDT 2022
Author: Maryam Moghadas
Date: 2022-08-25T12:34:43-05:00
New Revision: a09140f34f6bd22e823a50c88d3fcbdcb977a8f8
URL: https://github.com/llvm/llvm-project/commit/a09140f34f6bd22e823a50c88d3fcbdcb977a8f8
DIFF: https://github.com/llvm/llvm-project/commit/a09140f34f6bd22e823a50c88d3fcbdcb977a8f8.diff
LOG: Revert "[PowerPC] Remove extra swap for extract+vperm on LE"
This reverts commit f7294ac8093a2fbd8c00254580eaac6c4e1f7b24.
Added:
Modified:
llvm/lib/Target/PowerPC/PPCInstrVSX.td
llvm/test/CodeGen/PowerPC/vec_extract_p9.ll
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCInstrVSX.td b/llvm/lib/Target/PowerPC/PPCInstrVSX.td
index 605157576a518..aa97e800804b8 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrVSX.td
+++ b/llvm/lib/Target/PowerPC/PPCInstrVSX.td
@@ -3021,9 +3021,6 @@ defm : ScalToVecWPermute<v2f64, (f64 f64:$A),
(SUBREG_TO_REG (i64 1), $A, sub_64), 0),
(SUBREG_TO_REG (i64 1), $A, sub_64)>;
-def : Pat<(f64 (extractelt (v2f64 (bitconvert (v16i8
- (PPCvperm v16i8:$A, v16i8:$B, v16i8:$C)))), 0)),
- (f64 (EXTRACT_SUBREG (VPERM $B, $A, $C), sub_64))>;
def : Pat<(f64 (extractelt v2f64:$S, 0)),
(f64 (EXTRACT_SUBREG (XXPERMDI $S, $S, 2), sub_64))>;
def : Pat<(f64 (extractelt v2f64:$S, 1)),
diff --git a/llvm/test/CodeGen/PowerPC/vec_extract_p9.ll b/llvm/test/CodeGen/PowerPC/vec_extract_p9.ll
index f31d1cfb7a288..127e3c0e3e7c3 100644
--- a/llvm/test/CodeGen/PowerPC/vec_extract_p9.ll
+++ b/llvm/test/CodeGen/PowerPC/vec_extract_p9.ll
@@ -182,9 +182,10 @@ define double @test10(<4 x i32> %a, <4 x i32> %b) {
; CHECK-LE-NEXT: addi 3, 3, .LCPI9_0 at toc@l
; CHECK-LE-NEXT: lxv 36, 0(3)
; CHECK-LE-NEXT: addis 3, 2, .LCPI9_1 at toc@ha
-; CHECK-LE-NEXT: lfs 0, .LCPI9_1 at toc@l(3)
-; CHECK-LE-NEXT: vperm 2, 3, 2, 4
-; CHECK-LE-NEXT: xsadddp 1, 34, 0
+; CHECK-LE-NEXT: lfs 1, .LCPI9_1 at toc@l(3)
+; CHECK-LE-NEXT: vperm 2, 2, 3, 4
+; CHECK-LE-NEXT: xxswapd 0, 34
+; CHECK-LE-NEXT: xsadddp 1, 0, 1
; CHECK-LE-NEXT: blr
;
; CHECK-BE-LABEL: test10:
More information about the llvm-commits
mailing list