[PATCH] D65480: [AMDGPU] Fix for vectorizer crash with pointers of different size
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 30 15:38:30 PDT 2019
arsenm added inline comments.
================
Comment at: lib/Transforms/Vectorize/LoadStoreVectorizer.cpp:347-349
+ if (DL.getTypeStoreSizeInBits(PtrA->getType()) != PtrBitWidth ||
+ DL.getTypeStoreSizeInBits(PtrB->getType()) != PtrBitWidth)
+ return false;
----------------
Checking that PtrA and PtrB's address space are the same would be simpler
================
Comment at: test/CodeGen/AMDGPU/vect-ptr-ptr-size-mismatch.ll:1
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
+
----------------
Test should just run opt and go in test/Transforms/LoadStoreVectorizer
================
Comment at: test/CodeGen/AMDGPU/vect-ptr-ptr-size-mismatch.ll:3
+
+%struct._globalized_locals_ty = type { [64 x i32], [64 x i32*], [64 x i32*], [64 x i32*] }
+
----------------
Should be able to use a kernel argument instead of a global
================
Comment at: test/CodeGen/AMDGPU/vect-ptr-ptr-size-mismatch.ll:11-14
+entry:
+ br i1 undef, label %.worker, label %.mastercheck
+
+.worker: ; preds = %entry
----------------
Control flow should be unnecessary
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65480/new/
https://reviews.llvm.org/D65480
More information about the llvm-commits
mailing list