[PATCH] D54108: [ARM] Enable mixed types in ARM CGP

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 5 08:39:06 PST 2018


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

Previously, during the search, all values had to have the same 'TypeSize', which is equal to number of bits of the integer type of the icmp operand. All values in the tree had to match this size; meaning that, if we searched from i16, we wouldn't accept i8s. A change in type size requires zext and truncs to perform the casts so, to allow mixed narrow types, the handling of these instructions is now different:

- zexts are sinks if the result is larger than TypeSize.
- truncs are sinks if their result is less or equal to TypeSize.
- truncs are sources if their incoming value is greater or equal than TypeSize.


https://reviews.llvm.org/D54108

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54108.172594.patch
Type: text/x-patch
Size: 13107 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181105/06c54ec5/attachment.bin>


More information about the llvm-commits mailing list