[PATCH] D124651: [MIPS] Address instruction selection failure for abs.[sd]

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 17:39:06 PDT 2022


sdardis created this revision.
Herald added subscribers: atanasyan, jrtc27, hiraditya, arichardson.
Herald added a project: All.
sdardis requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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/53772.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124651

Files:
  llvm/lib/Target/Mips/MipsISelLowering.cpp
  llvm/lib/Target/Mips/MipsISelLowering.h
  llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
  llvm/test/CodeGen/Mips/llvm-ir/nan-fp-attr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124651.425938.patch
Type: text/x-patch
Size: 15970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220429/caf67af9/attachment.bin>


More information about the llvm-commits mailing list