-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path6_0_7_0_7_1_fix_popcnt.patch
23 lines (23 loc) · 1.26 KB
/
6_0_7_0_7_1_fix_popcnt.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Original LLVM commit details :
# Revision = r353124, Fix details = https://reviews.llvm.org/D57616
# This patch is to fix popcnt-1.ispc tests for llvm 6.0 onwards.
# Without this patch, the machine scheduler incorrectly calculates
# dependencies between this load and other accesses. In this case,
# there was a 32 byte vector store that was split into two 16 byte
# stores, one with offset 0 and one with offset 16. The size of the
# memory operand for both was 16. The scheduler correctly detected
# the alias with the offset 0 store, but not the offset 16 store.
Index: lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -15656,7 +15656,9 @@
Offset = DAG.getNode(
ISD::MUL, DL, PtrType, Offset,
DAG.getConstant(VecEltVT.getStoreSize(), DL, PtrType));
- MPI = OriginalLoad->getPointerInfo();
+ // Discard the pointer info except the address space because the memory
+ // operand can't represent this new access since the offset is variable.
+ MPI = MachinePointerInfo(OriginalLoad->getPointerInfo().getAddrSpace());
}
NewPtr = DAG.getNode(ISD::ADD, DL, PtrType, NewPtr, Offset);