[PATCH] D96953: [SVE] fix IRMover returning wrong modified vector type
Nashe Mncube via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 18 07:44:33 PST 2021
nasherm updated this revision to Diff 324633.
nasherm added a comment.
Addressing Sander's comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96953/new/
https://reviews.llvm.org/D96953
Files:
llvm/lib/Linker/IRMover.cpp
llvm/test/Linker/Inputs/fixed-vector-type-construction.ll
llvm/test/Linker/scalable-vector-type-construction.ll
Index: llvm/test/Linker/scalable-vector-type-construction.ll
===================================================================
--- /dev/null
+++ llvm/test/Linker/scalable-vector-type-construction.ll
@@ -0,0 +1,7 @@
+; RUN: llvm-link %p/Inputs/fixed-vector-type-construction.ll %p/scalable-vector-type-construction.ll -S -o - | FileCheck %s
+%t = type {i32, float}
+; CHECK: define void @foo(<4 x
+; CHECK; define void @bar(<vscale x 4 x
+define void @bar(<vscale x 4 x %t*> %x) {
+ ret void
+}
Index: llvm/test/Linker/Inputs/fixed-vector-type-construction.ll
===================================================================
--- /dev/null
+++ llvm/test/Linker/Inputs/fixed-vector-type-construction.ll
@@ -0,0 +1,4 @@
+%t = type {i32, float}
+define void @foo(<4 x %t*> %x) {
+ ret void
+}
Index: llvm/lib/Linker/IRMover.cpp
===================================================================
--- llvm/lib/Linker/IRMover.cpp
+++ llvm/lib/Linker/IRMover.cpp
@@ -298,10 +298,9 @@
return *Entry = ArrayType::get(ElementTypes[0],
cast<ArrayType>(Ty)->getNumElements());
case Type::ScalableVectorTyID:
- // FIXME: handle scalable vectors
case Type::FixedVectorTyID:
- return *Entry = FixedVectorType::get(
- ElementTypes[0], cast<FixedVectorType>(Ty)->getNumElements());
+ return *Entry = VectorType::get(ElementTypes[0],
+ cast<VectorType>(Ty)->getElementCount());
case Type::PointerTyID:
return *Entry = PointerType::get(ElementTypes[0],
cast<PointerType>(Ty)->getAddressSpace());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96953.324633.patch
Type: text/x-patch
Size: 1638 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210218/e101883b/attachment.bin>
More information about the llvm-commits
mailing list