[all-commits] [llvm/llvm-project] eb28da: [InstCombine] Remove side effect of replaced const...

Serge Pavlov via All-commits all-commits at lists.llvm.org
Sat May 7 05:06:12 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eb28da89a6594a017e067a2a4043c2f2bb2c425e
      https://github.com/llvm/llvm-project/commit/eb28da89a6594a017e067a2a4043c2f2bb2c425e
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2022-05-07 (Sat, 07 May 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/InstructionSimplify.h
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    A llvm/test/Transforms/InstCombine/constrained.ll

  Log Message:
  -----------
  [InstCombine] Remove side effect of replaced constrained intrinsics

If a constrained intrinsic call was replaced by some value, it was not
removed in some cases. The dangling instruction resulted in useless
instructions executed in runtime. It happened because constrained
intrinsics usually have side effect, it is used to model the interaction
with floating-point environment. In some cases side effect is actually
absent or can be ignored.

This change adds specific treatment of constrained intrinsics so that
their side effect can be removed if it actually absents.

Differential Revision: https://reviews.llvm.org/D118426




More information about the All-commits mailing list