[all-commits] [llvm/llvm-project] 36cc53: [EarlyCSE][OpaquePointers]Replace assert with retu...
dantrushin via All-commits
all-commits at lists.llvm.org
Mon Aug 8 06:15:15 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 36cc533471cb87ff6e9f44d9a3cd87f21369a87e
https://github.com/llvm/llvm-project/commit/36cc533471cb87ff6e9f44d9a3cd87f21369a87e
Author: Denis Antrushin <dantrushin at gmail.com>
Date: 2022-08-08 (Mon, 08 Aug 2022)
Changed paths:
M llvm/lib/Transforms/Scalar/EarlyCSE.cpp
M llvm/test/Transforms/EarlyCSE/opaque-ptr.ll
Log Message:
-----------
[EarlyCSE][OpaquePointers]Replace assert with return for mask type check.
When EarlyCSE tries to common vector masked loads/stores, it first checks that
they have same base operand and then assumes that this is enough for mask types
to be equal. This is true for typed pointers but false for opaque ones -
two loads of different vector sizes from same base pointer '%b' are the same,
`ptr %b`. (For typed pointers, `%b` was cast to vector pointer type so bases
were different).
Change assert to return from lambda `isSubmask` so this transformation properly
works with opaque pointers.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D131251
More information about the All-commits
mailing list