[PATCH] D38495: [X86] Fix bug in legalize vector types - Split large loads
Ayman Musa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 3 00:50:21 PDT 2017
aymanmus created this revision.
When splitting a large load to smaller legally-typed loads, the last load should be padded to reach the size of the previous one so a CONCAT_VECTORS node could reunite them again.
The code currently pads the last load to reach the size of the **first** load (instead of the previous).
https://reviews.llvm.org/D38495
Files:
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
test/CodeGen/X86/pr34653.ll
Index: test/CodeGen/X86/pr34653.ll
===================================================================
--- /dev/null
+++ test/CodeGen/X86/pr34653.ll
@@ -0,0 +1,10 @@
+; RUN: llc %s -O0 -mattr=+avx512f
+
+declare fastcc <38 x double> @test()
+
+define void @main() {
+entry:
+ %v = call fastcc <38 x double> @test()
+ %v.0 = extractelement <38 x double> %v, i32 0
+ ret void
+}
Index: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -3835,7 +3835,7 @@
}
LdOps.push_back(L);
-
+ LdOp = L;
LdWidth -= NewVTWidth;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38495.117482.patch
Type: text/x-patch
Size: 720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171003/7fbc8b9b/attachment.bin>
More information about the llvm-commits
mailing list