[PATCH] D76585: [PowerPC] Require NSZ flag for c-a*b to FNMSUB
Qiu Chaofan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 22 20:57:51 PDT 2020
qiucf created this revision.
qiucf added reviewers: PowerPC, spatel, RKSimon, lebedev.ri.
Herald added subscribers: llvm-commits, steven.zhang, shchenz, kbarton, hiraditya, nemanjai.
Herald added a project: LLVM.
On PowerPC, FNMSUB (including VSX and non-VSX version) means `-(a*b-c)`. But the backend now generates these instructions regardless whether `nsz` flag exists or not.
If `a*b-c==0`, such transformation changes sign of zero. This patch fixes this issue.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76585
Files:
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.h
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/lib/Target/PowerPC/PPCInstrVSX.td
llvm/test/CodeGen/PowerPC/combine-fneg.ll
llvm/test/CodeGen/PowerPC/fma-assoc.ll
llvm/test/CodeGen/PowerPC/fma-ext.ll
llvm/test/CodeGen/PowerPC/fma-negate.ll
llvm/test/CodeGen/PowerPC/fma.ll
llvm/test/CodeGen/PowerPC/repeated-fp-divisors.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76585.251939.patch
Type: text/x-patch
Size: 24991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200323/ef041030/attachment.bin>
More information about the llvm-commits
mailing list