[all-commits] [llvm/llvm-project] 84a4ca: [InstSimplify] Don't assume parent function when s...

sdesmalen-arm via All-commits all-commits at lists.llvm.org
Thu Jul 29 12:08:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 84a4caeb84d31550790d6922903714b6563469c9
      https://github.com/llvm/llvm-project/commit/84a4caeb84d31550790d6922903714b6563469c9
  Author: Sander de Smalen <sander.desmalen at arm.com>
  Date:   2021-07-29 (Thu, 29 Jul 2021)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/fold-vscale.ll
    M llvm/unittests/Transforms/Utils/LocalTest.cpp

  Log Message:
  -----------
  [InstSimplify] Don't assume parent function when simplifying llvm.vscale.

D106850 introduced a simplification for llvm.vscale by looking at the
surrounding function's vscale_range attributes. The call that's being
simplified may not yet have been inserted into the IR. This happens for
example during function cloning.

This patch fixes the issue by checking if the instruction is in a
parent basic block.




More information about the All-commits mailing list