[PATCH] D62057: [ARM][CGP] Skip nuw values in PrepareConstants

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 02:26:35 PDT 2019


samparker created this revision.
samparker added a reviewer: SjoerdMeijer.
Herald added subscribers: kristof.beyls, javed.absar.

PrepareConstants step converts add/sub with 'negative' immediates to sub/add with a 'positive' imm to make promotion more simple. nuw already states that the add shouldn't cause an unsigned overflow, so it shouldn't need any tweaking. Plus, we also don't allow a sub with a 'negative' immediate to be safe underflow, so this functionality has been removed. The PrepareConstants step now just handles the add instructions that we've determined would be safe if they underflow.


https://reviews.llvm.org/D62057

Files:
  lib/Target/ARM/ARMCodeGenPrepare.cpp
  test/CodeGen/ARM/CGP/arm-cgp-overflow.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62057.199999.patch
Type: text/x-patch
Size: 8548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190517/c9aadfd9/attachment.bin>


More information about the llvm-commits mailing list