[PATCH] D74559: [ARM] Fix infinite loop when lowering STRICT_FP_EXTEND

John Brawn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 13 07:12:15 PST 2020


john.brawn created this revision.
john.brawn added reviewers: dmgreen, SjoerdMeijer, miyuki, ostannard.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: LLVM.

If the target has FP64 but not FP16 then we have custom lowering for FP_EXTEND and STRICT_FP_EXTEND with type f64. However if the extend is from f32 to f64 the current implementation will cause in infinite loop for STRICT_FP_EXTEND due to emitting a merge_values of the original node which after replacement becomes a merge_values of itself.

Fix this by not doing anything for f32 to f64 extend when we have FP64, though for STRICT_FP_EXTEND we have to do the strict-to-nonstrict mutation as that doesn't happen automatically for opcodes with custom lowering.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74559

Files:
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/test/CodeGen/ARM/fp-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74559.244425.patch
Type: text/x-patch
Size: 7857 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200213/17d7817d/attachment.bin>


More information about the llvm-commits mailing list