[PATCH] D42574: [ARM] Lower lower saturate to 0 and lower saturate to -1 using bit-operations

Marten Svanfeldt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 2 00:30:15 PST 2018


thebolt updated this revision to Diff 132542.
thebolt added a comment.

This update hopefully solves the issues found by @eugenis

It adds a missing check for correctly formed expression, and limits the optimization to 32-bit values (which in practice is a majority of the cases you want to cover). Factored out the code that checks for the expression, in similar way to already existing isSaturatingExpression.

@yroux Can you please test and see that this indeed solves all the problems?


https://reviews.llvm.org/D42574

Files:
  lib/Target/ARM/ARMISelLowering.cpp
  test/CodeGen/ARM/atomic-op.ll
  test/CodeGen/ARM/sat-to-bitop.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42574.132542.patch
Type: text/x-patch
Size: 7744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180202/477a04b7/attachment.bin>


More information about the llvm-commits mailing list