[all-commits] [llvm/llvm-project] 518748: IR: handle FP predicates in CmpPredicate::getMatch...

Ramkumar Ramachandra via All-commits all-commits at lists.llvm.org
Tue Jan 14 10:17:29 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5187482fd0065b52fc483774799df082c2a35a4d
      https://github.com/llvm/llvm-project/commit/5187482fd0065b52fc483774799df082c2a35a4d
  Author: Ramkumar Ramachandra <ramkumar.ramachandra at codasip.com>
  Date:   2025-01-14 (Tue, 14 Jan 2025)

  Changed paths:
    M llvm/lib/IR/Instructions.cpp
    M llvm/test/Transforms/VectorCombine/X86/extract-cmp-binop.ll
    M llvm/unittests/IR/InstructionsTest.cpp

  Log Message:
  -----------
  IR: handle FP predicates in CmpPredicate::getMatching (#122924)

CmpPredicate::getMatching implicitly assumes that both predicates are
integer-predicates, and this has led to a crash being reported in
VectorCombine after e409204 (VectorCombine: teach foldExtractedCmps
about samesign). FP predicates are simple enough to handle as there is
never any samesign information associated with them: hence handle them
in CmpPredicate::getMatching, fixing the VectorCombine crash and
guarding against future incorrect usages.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list