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

sdardis via All-commits all-commits at lists.llvm.org
Fri Apr 29 15:28:36 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 938ed8ae99f92c19cfb92b76a7e20a72409df84a
      https://github.com/llvm/llvm-project/commit/938ed8ae99f92c19cfb92b76a7e20a72409df84a
  Author: Simon Dardis <simon.dardis at gmail.com>
  Date:   2022-04-29 (Fri, 29 Apr 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




More information about the All-commits mailing list