[all-commits] [llvm/llvm-project] 5e7e0d: [LoongArch] Fix pattern for FNMSUB_{S/D} instructi...

wanglei via All-commits all-commits at lists.llvm.org
Tue Nov 28 23:21:34 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5e7e0d603204ede803323a825318e365a87f73e9
      https://github.com/llvm/llvm-project/commit/5e7e0d603204ede803323a825318e365a87f73e9
  Author: wanglei <wanglei at loongson.cn>
  Date:   2023-11-29 (Wed, 29 Nov 2023)

  Changed paths:
    M llvm/lib/Target/LoongArch/LoongArchFloat32InstrInfo.td
    M llvm/lib/Target/LoongArch/LoongArchFloat64InstrInfo.td
    M llvm/test/CodeGen/LoongArch/double-fma.ll
    M llvm/test/CodeGen/LoongArch/float-fma.ll

  Log Message:
  -----------
  [LoongArch] Fix pattern for FNMSUB_{S/D} instructions (#73742)

```
when a=c=-0.0, b=0.0:
-(a * b + (-c)) = -0.0
-a * b + c = 0.0
(fneg (fma a, b (-c))) != (fma (fneg a), b ,c)
```

See https://reviews.llvm.org/D90901 for a similar discussion on X86.




More information about the All-commits mailing list