[all-commits] [llvm/llvm-project] 2526d8: [InstSimplify] Protect against more poison in Simp...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Aug 31 07:10:44 PDT 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 2526d8c43499fc5dd6135556ab16ae20d280ddca
      https://github.com/llvm/llvm-project/commit/2526d8c43499fc5dd6135556ab16ae20d280ddca
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-08-31 (Mon, 31 Aug 2020)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/select.ll

  Log Message:
  -----------
  [InstSimplify] Protect against more poison in SimplifyWithOpReplaced (PR47322)

Replace the check for poison-producing instructions in
SimplifyWithOpReplaced() with the generic helper canCreatePoison()
that properly handles poisonous shifts and thus avoids the problem
from PR47322.

This additionally fixes a bug in IIQ.UseInstrInfo=false mode, which
previously could have caused this code to ignore poison flags.
Setting UseInstrInfo=false should reduce the possible optimizations,
not increase them.

This is not a full solution to the problem, as poison could be
introduced more indirectly. This is just a minimal, easy to backport
fix.

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

(cherry picked from commit a5be86fde5de2c253aa19704bf4e4854f1936f8c)




More information about the All-commits mailing list