[PATCH] [NaryReassociate] enhances nsw by leveraging @llvm.assume

Jingyue Wu jingyue at google.com
Mon Jun 29 16:18:24 PDT 2015


Hi broune, meheff,

nsw are flaky and can often be removed by optimizations. This patch enhances
nsw by leveraging @llvm.assume in the IR. Specifically, NaryReassociate now
understands that

    assume(a + b >= 0) && assume(a >= 0) ==> a +nsw b

As a result, it can split more sext(a + b) into sext(a) + sext(b) for CSE.

http://reviews.llvm.org/D10822

Files:
  lib/Transforms/Scalar/NaryReassociate.cpp
  test/Transforms/NaryReassociate/NVPTX/nary-gep.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10822.28728.patch
Type: text/x-patch
Size: 9326 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150629/4e9063c0/attachment.bin>


More information about the llvm-commits mailing list