-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backporting LLVM patch r355582 to release/6.x (fixes AVX512 max issue) (
#31292) * Backporting LLVM patch r355582 to release/6.x (fixes AVX512 max issue
- Loading branch information
Showing
2 changed files
with
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
From 7f82bf14c02915ff1bf0e931465fc208287d24c6 Mon Sep 17 00:00:00 2001 | ||
From: nic <[email protected]> | ||
Date: Thu, 7 Mar 2019 22:01:01 +0100 | ||
Subject: [PATCH] Backporting r355582 on release/6.x | ||
|
||
--- | ||
lib/Target/X86/X86ISelLowering.cpp | 13 +++++++------ | ||
1 file changed, 7 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp | ||
index c1ddb771e2f..2a96373ed10 100644 | ||
--- a/lib/Target/X86/X86ISelLowering.cpp | ||
+++ b/lib/Target/X86/X86ISelLowering.cpp | ||
@@ -35751,15 +35751,17 @@ static SDValue combineFMinNumFMaxNum(SDNode *N, SelectionDAG &DAG, | ||
if (Subtarget.useSoftFloat()) | ||
return SDValue(); | ||
|
||
+ const TargetLowering &TLI = DAG.getTargetLoweringInfo(); | ||
+ | ||
// TODO: Check for global or instruction-level "nnan". In that case, we | ||
// should be able to lower to FMAX/FMIN alone. | ||
// TODO: If an operand is already known to be a NaN or not a NaN, this | ||
// should be an optional swap and FMAX/FMIN. | ||
|
||
EVT VT = N->getValueType(0); | ||
- if (!((Subtarget.hasSSE1() && (VT == MVT::f32 || VT == MVT::v4f32)) || | ||
- (Subtarget.hasSSE2() && (VT == MVT::f64 || VT == MVT::v2f64)) || | ||
- (Subtarget.hasAVX() && (VT == MVT::v8f32 || VT == MVT::v4f64)))) | ||
+ if (!((Subtarget.hasSSE1() && VT == MVT::f32) || | ||
+ (Subtarget.hasSSE2() && VT == MVT::f64) || | ||
+ (VT.isVector() && TLI.isTypeLegal(VT)))) | ||
return SDValue(); | ||
|
||
// This takes at least 3 instructions, so favor a library call when operating | ||
@@ -35770,9 +35772,8 @@ static SDValue combineFMinNumFMaxNum(SDNode *N, SelectionDAG &DAG, | ||
SDValue Op0 = N->getOperand(0); | ||
SDValue Op1 = N->getOperand(1); | ||
SDLoc DL(N); | ||
- EVT SetCCType = DAG.getTargetLoweringInfo().getSetCCResultType( | ||
- DAG.getDataLayout(), *DAG.getContext(), VT); | ||
- | ||
+ EVT SetCCType = TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), | ||
+ VT); | ||
// There are 4 possibilities involving NaN inputs, and these are the required | ||
// outputs: | ||
// Op1 | ||
-- | ||
2.14.1 |
8c0b550
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Executing the daily benchmark build, I will reply here when finished:
@nanosoldier
runbenchmarks(ALL, isdaily = true)
8c0b550
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan