[PATCH] D59602: [CodeGenPrepare] limit formation of overflow intrinsics (PR41129)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 10:10:40 PDT 2019


spatel created this revision.
spatel added reviewers: Carrot, tejohnson.
Herald added subscribers: jdoerfert, hiraditya, mcrosier.
Herald added a project: LLVM.

This is probably a bigger limitation than necessary, but since we don't have any evidence yet that this transform led to perf improvements rather than regressions, I'm proposing a quick, blunt fix.

In the motivating x86 example from:
https://bugs.llvm.org/show_bug.cgi?id=41129
...and shown in the regression test, we want to avoid an extra instruction in the dominating block because that could be costly.

The x86 LSR test diff is reversing the changes from D57789 <https://reviews.llvm.org/D57789>. I don't have evidence that 1 version is any better than the other.


https://reviews.llvm.org/D59602

Files:
  llvm/lib/CodeGen/CodeGenPrepare.cpp
  llvm/test/CodeGen/X86/cgp-usubo.ll
  llvm/test/CodeGen/X86/lsr-loop-exit-cond.ll
  llvm/test/Transforms/CodeGenPrepare/X86/overflow-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59602.191522.patch
Type: text/x-patch
Size: 7708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190320/7f1f9364/attachment.bin>


More information about the llvm-commits mailing list