[all-commits] [llvm/llvm-project] 198626: [MIPS] Address instruction selection failure for a...

sdardis via All-commits all-commits at lists.llvm.org
Tue Jun 7 18:52:26 PDT 2022


  Branch: refs/heads/release/14.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 198626ad43fd1e5425fcd57c764057b1979431c6
      https://github.com/llvm/llvm-project/commit/198626ad43fd1e5425fcd57c764057b1979431c6
  Author: Simon Dardis <simon.dardis at gmail.com>
  Date:   2022-06-07 (Tue, 07 Jun 2022)

  Changed paths:
    M llvm/lib/Target/Mips/MipsISelLowering.cpp
    M llvm/lib/Target/Mips/MipsISelLowering.h
    M llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
    A llvm/test/CodeGen/Mips/llvm-ir/nan-fp-attr.ll

  Log Message:
  -----------
  [MIPS] Address instruction selection failure for abs.[sd]

Previously, the choice between the instruction selection of ISD::FABS was
decided at the point of setting the MIPS target lowering operation choice
either `Custom` lowering or `Legal`. This lead to instruction selection
failures as functions could be marked as having no NaNs.

Changing the lowering to always be `Custom` and directly handling the
the cases where MIPS selects the instructions for ISD::FABS resolves
this crash.

Thanks to kray for reporting the issue and to Simon Atanasyan for producing
the reduced test case.

This resolves PR/53722.

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

(cherry picked from commit 938ed8ae99f92c19cfb92b76a7e20a72409df84a)




More information about the All-commits mailing list