[PATCH] D34467: [SelectionDAG] set dereferenceable flag when expanding memcpy/memmove

Hiroshi Inoue via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 21 11:45:48 PDT 2017


inouehrs created this revision.

When SelectionDAG expands memcpy (or memmove) call into a sequence of load and store instructions, it disregards dereferenceable flag even the source pointer is known to be dereferenceable.
This results in an assertion failure if SelectionDAG commonizes a load instruction generated for memcpy with another load instruction for the source pointer.
This patch makes SelectionDAG to set the dereferenceable flag for the load instructions properly to avoid the assertion failure.

Test cases to be added soon.


https://reviews.llvm.org/D34467

Files:
  include/llvm/CodeGen/MachineMemOperand.h
  lib/CodeGen/MachineInstr.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34467.103428.patch
Type: text/x-patch
Size: 5056 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170621/6ab7ac02/attachment.bin>


More information about the llvm-commits mailing list