[PATCH] D11591: Allow PeepholeOptimizer to fold a few more cases

Michael Kuperstein michael.m.kuperstein at intel.com
Wed Jul 29 06:16:57 PDT 2015


mkuper created this revision.
mkuper added reviewers: qcolombet, bruno, manmanren, atrick.
mkuper added a subscriber: llvm-commits.

The current condition looks overly conservative.
I don't see why an IMPLICIT_DEF, for instance, should clear the folding candidate set, and the same for KILL.
Two things I'm not sure of:
1) Should isPosition() be a barrier?
2) Is the explicit check for isInlineAsm() really necessary? (InlineAsm should correctly report mayStore()/hasUnmodeledSideEffects(), right?)

Andrew, I've added you to the review because of the rdar mentioned in the test-case. The folding there currently didn't happen due to an intervening IMPLICIT_DEF, and not because of any scheduling issues. Am I missing something?

http://reviews.llvm.org/D11591

Files:
  lib/CodeGen/PeepholeOptimizer.cpp
  test/CodeGen/X86/avx-cvt.ll
  test/CodeGen/X86/shift-bmi2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11591.30901.patch
Type: text/x-patch
Size: 3551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150729/edb56527/attachment.bin>


More information about the llvm-commits mailing list