[llvm-commits] PATCH: Enable scalar store promotion in DAG Legalizer
Tom Stellard
tom at stellard.net
Thu Dec 6 14:27:03 PST 2012
On Thu, Dec 06, 2012 at 10:02:33AM -0800, Tom Stellard wrote:
> Hi,
>
> The attached patch removes an assert that prevents the DAG Legalizer
> from promoting scalar stores. I'm not sure why this assert is here,
> but it seems safe to remove.
>
> -Tom
> diff --git lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
> index abf40b7..81e2088 100644
> --- lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
> +++ lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
> @@ -731,7 +731,6 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) {
> return;
> }
> case TargetLowering::Promote: {
> - assert(VT.isVector() && "Unknown legal promote case!");
> Value = DAG.getNode(ISD::BITCAST, dl,
> TLI.getTypeToPromoteTo(ISD::STORE, VT), Value);
> SDValue Result =
Hi,
I've also attached a similar patch for LegalizeLoadOps
-Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Allow-scalar-promotion-for-loads.patch
Type: text/x-diff
Size: 665 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121206/1ede710d/attachment.patch>
More information about the llvm-commits
mailing list