[SVE] Fix the FP arithmetic instruction costs for SVE
authorDavid Sherwood <david.sherwood@arm.com>
Tue, 31 Aug 2021 13:07:50 +0000 (14:07 +0100)
committerDavid Sherwood <david.sherwood@arm.com>
Thu, 2 Sep 2021 08:55:13 +0000 (09:55 +0100)
commitd581d943858195f14863ee8f2a5050aafed883a2
treef45cf92ce2b0f9d6828e2c75cb2dd23c2d99eb30
parentdfb7518df18ad420984f965ef5ccfb4e126d839b
[SVE] Fix the FP arithmetic instruction costs for SVE

Several FP instructions (fadd, fsub, etc.) were incorrectly assigned
a higher cost for SVE because they have custom lowering, however we
know they are legal. This patch explicitly assigns a cost of 2 to
these opcodes.

Tests added here:

  Analysis/CostModel/AArch64/arith-fp-sve.ll

Differential Revision: https://reviews.llvm.org/D108993
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/test/Analysis/CostModel/AArch64/arith-fp-sve.ll [new file with mode: 0644]
llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll
llvm/test/Analysis/CostModel/AArch64/sve-math.ll