[all-commits] [llvm/llvm-project] 4c52d5: [InstCombine] Fix a code-sinking bug after D73832/...

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Mar 25 22:51:39 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c52d51e784ca7603969f2a664e5430d41b9d5dc
      https://github.com/llvm/llvm-project/commit/4c52d51e784ca7603969f2a664e5430d41b9d5dc
  Author: Fangrui Song <maskray at google.com>
  Date:   2020-03-25 (Wed, 25 Mar 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

  Log Message:
  -----------
  [InstCombine] Fix a code-sinking bug after D73832/f1a9efabcb9b

- UserParent = PN->getIncomingBlock(*I->use_begin());
+ UserParent = PN->getIncomingBlock(*SingleUse);

The first use of I may be droppable (llvm.assume).

When compiling llvm/lib/IR/AutoUpgrade.cpp with a bootstrapped clang
with ThinLTO with minimized bitcode files, I see such a case in
the function _ZN4llvm20UpgradeIntrinsicCallEPNS_8CallInstEPNS_8FunctionE

  clang -c -fthinlto-index=AutoUpgrade.o.thinlto.bc AutoUpgrade.bc -O3

Unfortunately it is really difficult to get a minimized reproduce.




More information about the All-commits mailing list