[llvm] r292461 - GlobalISel: Implement narrowing for G_LOAD

Pete Cooper via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 18:12:36 PST 2017


Hi Justin
> On Jan 18, 2017, at 5:05 PM, Justin Bogner via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> +
> +    ; CHECK: [[OFFSET0:%[0-9]+]](s64) = G_CONSTANT i64 0
> +    ; CHECK: [[GEP0:%[0-9]+]](p0) = G_GEP %0, [[OFFSET0]](s64)
> +    ; CHECK: [[LOAD0:%[0-9]+]](s64) = G_LOAD [[GEP0]](p0) :: (load 16 from %ir.addr)
> +    ; CHECK: [[OFFSET1:%[0-9]+]](s64) = G_CONSTANT i64 8
> +    ; CHECK: [[GEP1:%[0-9]+]](p0) = G_GEP %0, [[OFFSET1]](s64)
> +    ; CHECK: [[LOAD1:%[0-9]+]](s64) = G_LOAD [[GEP1]](p0) :: (load 16 from %ir.addr)
> +    ; CHECK: %8(s128) = G_SEQUENCE [[LOAD0]](s64), 0, [[LOAD1]](s64), 64
> +    %8(s128) = G_LOAD %0(p0) :: (load 16 from %ir.addr)
Note sure if any clients of mem operands care, but you just copy the mem operand ("load 16") from the source instruction to the 2 new instructions.  This isn't correct as the 2 new instructions get "load 16" but should have "load 8".

Cheers,
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170118/993104e0/attachment.html>


More information about the llvm-commits mailing list