Skip to content

Commit c3a2606

Browse files
author
himadhith
committed
Updating testfile
1 parent a74747d commit c3a2606

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/test/CodeGen/PowerPC/vector-all-ones.ll

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@
88
; RUN: llc -verify-machineinstrs -O3 -mcpu=pwr9 -mtriple=powerpc-ibm-aix \
99
; RUN: -ppc-asm-full-reg-names --ppc-vsr-nums-as-vr < %s | FileCheck %s
1010

11-
; Currently the generated code uses `vspltisw` to generate vector of 1s followed by add operation.
12-
; This pattern is expected to be optimized in a future patch by using `xxleqv` to generate vector of -1s
13-
; followed by subtraction operation.
11+
; Optimized version of vector addition with {1,1,1,1} by replacing `vspltisw + vadduwm` with 'xxleqv + vsubuwm'
1412
define dso_local noundef <4 x i32> @test1(<4 x i32> %a) {
1513
; CHECK-LABEL: test1:
1614
; CHECK: # %bb.0: # %entry
17-
; CHECK-NEXT: vspltisw v3, 1
18-
; CHECK-NEXT: vadduwm v2, v2, v3
15+
; CHECK-NEXT: xxleqv v3, v3, v3
16+
; CHECK-NEXT: vsubuwm v2, v2, v3
1917
; CHECK-NEXT: blr
2018
entry:
2119
%add = add <4 x i32> %a, splat (i32 1)

0 commit comments

Comments
 (0)