[PATCH] [ARM] Wrong t2STMIA size optimization in Thumb2SizeReduction

Sergey Dmitrouk sdmitrouk at accesssoftek.com
Wed Sep 10 04:20:46 PDT 2014


Wrong check in Thumb2SizeReduction caused reduction of t2STMIA instruction
to t1STMIA even when t2STMIA has LR register in its register list.  This is
wrong as register list of t1STMIA is 8 bit long (for R0-R7 only), thus LR
register (R14) is just thrown away on emitting binary representation of t1STMIA.
It causes some data to be silently lost at run-time, in very rare cases.

http://reviews.llvm.org/D5290

Files:
  lib/Target/ARM/Thumb2SizeReduction.cpp
  test/CodeGen/ARM/wrong-t2stmia-size-opt.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5290.13528.patch
Type: text/x-patch
Size: 3250 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140910/a70ff8e2/attachment.bin>


More information about the llvm-commits mailing list