diff options
author | Warren Ristow <warren.ristow@sony.com> | 2019-06-17 17:20:08 +0000 |
---|---|---|
committer | Warren Ristow <warren.ristow@sony.com> | 2019-06-17 17:20:08 +0000 |
commit | 6452bdd29b5a0bd0f902c06046add459f910d335 (patch) | |
tree | 73dbbcd0c95a8c83663cfc29775628a019280b09 /llvm/lib/Target/X86/X86TargetTransformInfo.h | |
parent | 3e140066bce1cbc40604274bd99a0cc2efed01f5 (diff) | |
download | bcm5719-llvm-6452bdd29b5a0bd0f902c06046add459f910d335.tar.gz bcm5719-llvm-6452bdd29b5a0bd0f902c06046add459f910d335.zip |
[LV] Suppress vectorization in some nontemporal cases
When considering a loop containing nontemporal stores or loads for
vectorization, suppress the vectorization if the corresponding
vectorized store or load with the aligment of the original scaler
memory op is not supported with the nontemporal hint on the target.
This adds two new functions:
bool isLegalNTStore(Type *DataType, unsigned Alignment) const;
bool isLegalNTLoad(Type *DataType, unsigned Alignment) const;
to TTI, leaving the target independent default implementation as
returning true, but with overriding implementations for X86 that
check the legality based on available Subtarget features.
This fixes https://llvm.org/PR40759
Differential Revision: https://reviews.llvm.org/D61764
llvm-svn: 363581
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetTransformInfo.h')
-rw-r--r-- | llvm/lib/Target/X86/X86TargetTransformInfo.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.h b/llvm/lib/Target/X86/X86TargetTransformInfo.h index 351a4f22060..f43155e3838 100644 --- a/llvm/lib/Target/X86/X86TargetTransformInfo.h +++ b/llvm/lib/Target/X86/X86TargetTransformInfo.h @@ -186,6 +186,8 @@ public: bool canMacroFuseCmp(); bool isLegalMaskedLoad(Type *DataType); bool isLegalMaskedStore(Type *DataType); + bool isLegalNTLoad(Type *DataType, unsigned Alignment); + bool isLegalNTStore(Type *DataType, unsigned Alignment); bool isLegalMaskedGather(Type *DataType); bool isLegalMaskedScatter(Type *DataType); bool isLegalMaskedExpandLoad(Type *DataType); |