-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path9_0_10_0_avx512_disable_fast_isel_vxi1.patch
30 lines (27 loc) · 1.27 KB
/
9_0_10_0_avx512_disable_fast_isel_vxi1.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# This patch is required to compile avx512 targets with -O0
Commit 85726bbcbaa04d66d7a567c653b277aa4e96fb9b Mon Sep 17 00:00:00 2001
Author: Craig Topper <[email protected]>
Date: Mon, 16 Mar 2020 17:58:19 -0700
Subject: [X86] Disable fast-isel call lowering for functions with vXi1
arguments on avx512.
This fails an assert because the type is marked in the calling
convention td file as needing promotion, but the code doesn't know
how to do it.
It also much more complicated because we try to pass these in
xmm/ymm/zmm registers. As of a few weeks ago we do this promotion
from getRegisterTypeForCallingConv before the td file generated
code gets involved.
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp
index 027e2c2d45a..c25785b9000 100644
--- a/llvm/lib/Target/X86/X86FastISel.cpp
+++ b/llvm/lib/Target/X86/X86FastISel.cpp
@@ -3289,7 +3289,8 @@ bool X86FastISel::fastLowerCall(CallLoweringInfo &CLI) {
ResultReg =
fastEmit_ri(VT, VT, ISD::AND, ResultReg, hasTrivialKill(PrevVal), 1);
} else {
- if (!isTypeLegal(Val->getType(), VT))
+ if (!isTypeLegal(Val->getType(), VT) ||
+ (VT.isVector() && VT.getVectorElementType() == MVT::i1))
return false;
ResultReg = getRegForValue(Val);
}