ARM: check alignment before transforming ldr -> ldm (or similar).
authorTim Northover <tnorthover@apple.com>
Mon, 19 Sep 2016 09:11:09 +0000 (09:11 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 19 Sep 2016 09:11:09 +0000 (09:11 +0000)
commiteaee28b5caec0972aa35479fecbe4196528c8fb8
tree9f633e84d3df7de9eb749dce3cc4a25528d64795
parent59f6f8c05d8fb5c34340d48611e69680a12376d4
ARM: check alignment before transforming ldr -> ldm (or similar).

ldm and stm instructions always require 4-byte alignment on the pointer, but we
weren't checking this before trying to reduce code-size by replacing a
post-indexed load/store with them. Unfortunately, we were also dropping this
incormation in DAG ISel too, but that's easy enough to fix.

llvm-svn: 281893
llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
llvm/lib/Target/ARM/Thumb2SizeReduction.cpp
llvm/test/CodeGen/ARM/thumb2-size-opt.ll