Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64] Mark function calls as possibly changing FPCR
This patch does the same changes as D111433 for PowerPC and D139549 for X86, - in the strictfp function all calls are marked as implicit defs of FPCR. It prevents from moving FP operations across function calls, which may change rounding mode, as fesetround does. Differential Revision: https://reviews.llvm.org/D143001
- Loading branch information
Showing
3 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
; RUN: llc -mtriple aarch64-none-linux-gnu -stop-after=finalize-isel %s -o - | FileCheck %s | ||
|
||
define float @func_02(float %x, float %y) strictfp nounwind { | ||
%call = call float @func_01(float %x) strictfp | ||
%res = call float @llvm.experimental.constrained.fadd.f32(float %call, float %y, metadata !"round.dynamic", metadata !"fpexcept.ignore") strictfp | ||
ret float %res | ||
} | ||
; CHECK-LABEL: name: func_02 | ||
; CHECK: BL @func_01, {{.*}}, implicit-def $fpcr | ||
|
||
|
||
declare float @func_01(float) | ||
declare float @llvm.experimental.constrained.fadd.f32(float, float, metadata, metadata) |