[PATCH] [SelectionDAG] Combine extload/store/load sequence into extload.

Ahmed Bougacha ahmed.bougacha at gmail.com
Fri Dec 5 13:56:44 PST 2014


Hi qcolombet,

If this extload is directly stored, and that store's input value was
loaded before still, try to avoid the roundtrip through memory and
extload directly from the original memory location.

This can't be caught by the other store-to-load forwarding DAGCombines,
because the extload's memory type might not be legal.
Instead, try to match this:
    v4i32 load %ptr2, zext from v4i8
      store i32 %value, %ptr2
        %value = load i32 %ptr1
to turn the extload into:
    v4i32 load %ptr1, zext from v4i8

Avoids a regression in an X86 testcase with D6533.

http://reviews.llvm.org/D6552

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/X86/widen_load-2.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6552.16997.patch
Type: text/x-patch
Size: 2952 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141205/69e9fb77/attachment.bin>


More information about the llvm-commits mailing list