[PATCH] D40763: PeepholeOptimizer: Handle undef operands correctly

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 17:52:38 PST 2017


MatzeB created this revision.
Herald added subscribers: javed.absar, mcrosier.

The PeepholeOptimizer doesn't correctly propagate undef and would fail for vregs without definition.

Found while manually crafting testcases, in practice this is probably rare as it would mean incomplete DCE.

This changes the code to simply bail out if undef operands are involved (which is simpler code than correctly propagating the undef flag).


Repository:
  rL LLVM

https://reviews.llvm.org/D40763

Files:
  include/llvm/CodeGen/TargetInstrInfo.h
  lib/CodeGen/PeepholeOptimizer.cpp
  lib/CodeGen/TargetInstrInfo.cpp
  lib/Target/ARM/ARMBaseInstrInfo.cpp
  test/CodeGen/ARM/peephole-phi.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40763.125251.patch
Type: text/x-patch
Size: 7209 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171202/0fbf9392/attachment.bin>


More information about the llvm-commits mailing list