[all-commits] [llvm/llvm-project] cf4161: [Instcombine] Disable memcpy of alloca bypass for ...

Benjamin Kramer via All-commits all-commits at lists.llvm.org
Wed Apr 14 07:52:45 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cf4161673c7e7c7c57d8115468bfcc9988f43d36
      https://github.com/llvm/llvm-project/commit/cf4161673c7e7c7c57d8115468bfcc9988f43d36
  Author: Benjamin Kramer <benny.kra at googlemail.com>
  Date:   2021-04-14 (Wed, 14 Apr 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
    M llvm/test/Transforms/InstCombine/tmp-alloca-bypass.ll

  Log Message:
  -----------
  [Instcombine] Disable memcpy of alloca bypass for instruction sources

This transformation is fundamentally broken when it comes to dominance,
it just happened to work when the source of the memcpy can be moved into
the place of the alloca. The bug shows up a lot more often since
077bff39d46364035a5dcfa32fc69910ad0975d0 allows the source to be a
switch.

It would be possible to check dominance of the source and all its
operands, but that seems very heavy for instcombine.




More information about the All-commits mailing list