[PATCH] D132722: [RISCV][NFC] Refactor fadd test to match the code.
Jianjian Guan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 26 01:21:53 PDT 2022
jacquesguan created this revision.
jacquesguan added reviewers: fakepaper56, frasercrmck, rogfer01, craig.topper.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, arichardson.
Herald added a project: All.
jacquesguan requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
Change fadd test case in D122563 <https://reviews.llvm.org/D122563> to match the fold base case.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D132722
Files:
llvm/test/CodeGen/RISCV/rvv/fold-binary-reduce.ll
Index: llvm/test/CodeGen/RISCV/rvv/fold-binary-reduce.ll
===================================================================
--- llvm/test/CodeGen/RISCV/rvv/fold-binary-reduce.ll
+++ llvm/test/CodeGen/RISCV/rvv/fold-binary-reduce.ll
@@ -252,8 +252,9 @@
; CHECK-NEXT: vfmv.f.s fa0, v8
; CHECK-NEXT: ret
entry:
- %rdx = call fast float @llvm.vector.reduce.fadd.v4f32(float %x, <4 x float> %v)
- ret float %rdx
+ %rdx = call fast float @llvm.vector.reduce.fadd.v4f32(float 0.0, <4 x float> %v)
+ %res = fadd reassoc nsz float %rdx, %x
+ ret float %res
}
define float @reduce_fmax(float %x, <4 x float> %v) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132722.455826.patch
Type: text/x-patch
Size: 623 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220826/516ec172/attachment.bin>
More information about the llvm-commits
mailing list