[PATCH] D65148: [SimplifyCFG] Bump phi-node-folding-threshold from 2 to 3

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 07:53:18 PDT 2019


lebedev.ri updated this revision to Diff 217880.
lebedev.ri added a comment.

And found one more pattern that'd eventually benefit from this - safe naive implementation of X86 BZHI pattern, like

  // a more likely use-case to avoid shift C UB for c from 1 to 32
  unsigned bzhi(unsigned x, unsigned c) {
      if (c < 32) {
          x &= ((1U << c) - 1);
      }
      return x;
  }

https://gcc.godbolt.org/z/0UzVJN

^ everything except `bzhil` itself there isn't needed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65148/new/

https://reviews.llvm.org/D65148

Files:
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp
  llvm/test/Transforms/IndVarSimplify/loop_evaluate_1.ll
  llvm/test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll
  llvm/test/Transforms/SimplifyCFG/safe-abs.ll
  llvm/test/Transforms/SimplifyCFG/safe-low-bit-extract.ll
  llvm/test/Transforms/SimplifyCFG/signbit-like-value-extension.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65148.217880.patch
Type: text/x-patch
Size: 6269 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190829/9b533e0e/attachment-0001.bin>


More information about the llvm-commits mailing list