[all-commits] [llvm/llvm-project] f76582: [AArch64] Consider instruction-level contract FMFs...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Tue Aug 4 02:30:08 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: f7658241cb27491b4160a1f7060ef883bc535d09
https://github.com/llvm/llvm-project/commit/f7658241cb27491b4160a1f7060ef883bc535d09
Author: Florian Hahn <flo at fhahn.com>
Date: 2020-08-04 (Tue, 04 Aug 2020)
Changed paths:
M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
M llvm/test/CodeGen/AArch64/machine-combiner-instr-fmf.mir
M llvm/test/CodeGen/AArch64/neon-fma-FMF.ll
Log Message:
-----------
[AArch64] Consider instruction-level contract FMFs in combiner patterns.
Currently, instruction level fast math flags are not considered when
generating patterns for the machine combiner.
This currently leads to some missed opportunities to generate FMAs in
combination with `#pragma clang fp contract (fast)`.
For example, when building the example below with -O3 for AArch64, no
FMADD is generated. If built with -O2 and the DAGCombiner is used
instead of the MachineCombiner for FMAs, an FMADD is generated.
With this patch, the same code is generated in both cases.
float madd_contract(float a, float b, float c) {
#pragma clang fp contract (fast)
return (a * b) + c;
}
Reviewed By: dmgreen
Differential Revision: https://reviews.llvm.org/D84930
More information about the All-commits
mailing list