[llvm] r308184 - Avoid store merge to f128 in context of noimpiccitfloat NFCI.
Nirav Dave via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 17 08:09:48 PDT 2017
Author: niravd
Date: Mon Jul 17 08:09:47 2017
New Revision: 308184
URL: http://llvm.org/viewvc/llvm-project?rev=308184&view=rev
Log:
Avoid store merge to f128 in context of noimpiccitfloat NFCI.
Prevent store merge from merging stores into an invalid 128-bit store
(realized as a f128 value in the context of the noimplicitfloat
attribute). Previously, such stores are immediately split back into
valid stores.
Modified:
llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.h
Modified: llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.h?rev=308184&r1=308183&r2=308184&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.h (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.h Mon Jul 17 08:09:47 2017
@@ -408,6 +408,19 @@ public:
bool isIntDivCheap(EVT VT, AttributeList Attr) const override;
+ bool canMergeStoresTo(unsigned AddressSpace, EVT MemVT,
+ const SelectionDAG &DAG) const override {
+ // Do not merge to float value size (128 bytes) if no implicit
+ // float attribute is set.
+
+ bool NoFloat = DAG.getMachineFunction().getFunction()->hasFnAttribute(
+ Attribute::NoImplicitFloat);
+
+ if (NoFloat)
+ return (MemVT.getSizeInBits() <= 64);
+ return true;
+ }
+
bool isCheapToSpeculateCttz() const override {
return true;
}
More information about the llvm-commits
mailing list