Go to the source code of this file.
|
static LogicalResult | transferPreconditions (PatternRewriter &rewriter, VectorTransferOpInterface xferOp, bool &requiresBroadcasting, VectorType &unbroadcastedVectorType) |
| This pattern supports lowering of: vector.transfer_read to a combination of vector.load , arith.select and vector.broadcast if all of the following hold: More...
|
|
◆ GEN_PASS_DEF_AMDGPUTRANSFERREADTOLOADPASS
#define GEN_PASS_DEF_AMDGPUTRANSFERREADTOLOADPASS |
◆ transferPreconditions()
static LogicalResult transferPreconditions |
( |
PatternRewriter & |
rewriter, |
|
|
VectorTransferOpInterface |
xferOp, |
|
|
bool & |
requiresBroadcasting, |
|
|
VectorType & |
unbroadcastedVectorType |
|
) |
| |
|
static |
This pattern supports lowering of: vector.transfer_read
to a combination of vector.load
, arith.select
and vector.broadcast
if all of the following hold:
- The transfer op is masked.
- The memref is in buffer address space.
- Stride of most minor memref dimension must be 1.
- Out-of-bounds masking is not required.
- If the memref's element type is a vector type then it coincides with the result type.
- The permutation map doesn't perform permutation (broadcasting is allowed). Note: those conditions mostly come from TransferReadToVectorLoadLowering pass.
Definition at line 40 of file TransferReadToLoad.cpp.
References mlir::RewriterBase::notifyMatchFailure(), and vectorShape().