[PowerPC] Replace subtract-from-zero float in version with fneg in PowerPC special...
authorAndrew Wock <ajwock@gmail.com>
Fri, 3 Apr 2020 18:55:27 +0000 (14:55 -0400)
committerKevin P. Neal <kevin.neal@sas.com>
Fri, 3 Apr 2020 18:59:33 +0000 (14:59 -0400)
commitba87430cadb2d5d0ee8e4b75101d7abcf6b321bf
tree018000ee25598ac0713d05cd8093a91ec73b9123
parent9657446313abd4b3b44f66a30430c0d7f6ccd7b8
[PowerPC] Replace subtract-from-zero float in version with fneg in PowerPC special fma compiler builtins

This patch adds a test for the PowerPC fma compiler builtins, some variations
of which negate inputs and outputs. The code to generate IR for these
builtins was untested before this patch.

Originally, the code used the outdated method of subtracting floating point
values from -0.0 as floating point negation. This patch remedies that.

Patch by: Drew Wock <drew.wock@sas.com>
Differential Revision: https://reviews.llvm.org/D76949
clang/lib/CodeGen/CGBuiltin.cpp
clang/test/CodeGen/builtins-ppc-fma.c [new file with mode: 0644]