[PATCH] D64707: [x86] try harder to form LEA from ADD to avoid flag conflicts (PR40483)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 14 07:25:45 PDT 2019


spatel created this revision.
spatel added reviewers: RKSimon, craig.topper.
Herald added subscribers: hiraditya, mcrosier.
Herald added a project: LLVM.

LEA doesn't affect flags, so use it more liberally to replace an ADD when we know that the ADD operands affect flags.

In the motivating example from PR40483:
https://bugs.llvm.org/show_bug.cgi?id=40483
...this lets us avoid duplicating a math op just to avoid flag conflict.


https://reviews.llvm.org/D64707

Files:
  llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
  llvm/test/CodeGen/X86/combine-sbb.ll
  llvm/test/CodeGen/X86/umulo-128-legalisation-lowering.ll
  llvm/test/CodeGen/X86/umulo-64-legalisation-lowering.ll
  llvm/test/CodeGen/X86/vec_umulo.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64707.209731.patch
Type: text/x-patch
Size: 24090 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190714/c7b9465c/attachment.bin>


More information about the llvm-commits mailing list