]> granicus.if.org Git - llvm/commit
[SelectionDAG] Resolve PR33978.
authorSimon Dardis <simon.dardis@imgtec.com>
Thu, 3 Aug 2017 09:38:46 +0000 (09:38 +0000)
committerSimon Dardis <simon.dardis@imgtec.com>
Thu, 3 Aug 2017 09:38:46 +0000 (09:38 +0000)
commit441e1a2fef44255ba58cefa4555e02d3fcaed7a2
treea7e53087470eba79c86acb7222cfae8430511108
parentf133b32f8e87a652f6716b97adcad70c5e5f3938
[SelectionDAG] Resolve PR33978.

rL306209 taught SelectionDAG how to add the dereferenceable flag when
expanding memcpy and memmove. The fix however contained a nit where
the offset + size was constructed as an APInt of PointerSize rather
than PointerSizeInBits.

This lead to isDereferenceableAndAlignedPointer() get truncated values or
values which would be sign extended within that function leading to
incorrect results.

Thanks to Alex Crichton for reporting the issue!

This resolves PR33978.

Reviewers: inouehrs

Differential Revision: https://reviews.llvm.org/D36236

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309930 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineInstr.cpp
test/CodeGen/Mips/pr33978.ll [new file with mode: 0644]