[PowerPC] Expand constrained ppc_fp128 to i32 conversion
authorQiu Chaofan <qiucofan@cn.ibm.com>
Sat, 5 Sep 2020 05:16:20 +0000 (13:16 +0800)
committerQiu Chaofan <qiucofan@cn.ibm.com>
Sat, 5 Sep 2020 05:16:20 +0000 (13:16 +0800)
commit705271d9cd0e981b2df41cf2802880dcd5925281
treea4ba4faa4faaacf6a121e1876b72d3ed2dba0368
parent2d652949be4b772f2c11577621b0ad33052ac844
[PowerPC] Expand constrained ppc_fp128 to i32 conversion

Libcall __gcc_qtou is not available, which breaks some tests needing
it. On PowerPC, we have code to manually expand the operation, this
patch applies it to constrained conversion. To keep it strict-safe,
it's using the algorithm similar to expandFP_TO_UINT.

For constrained operations marking FP exception behavior as 'ignore',
we should set the NoFPExcept flag. However, in some custom lowering
the flag is missed. This should be fixed by future patches.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D86605
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.h
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/test/CodeGen/PowerPC/fp-strict-conv-f128.ll
llvm/test/CodeGen/PowerPC/ppcf128-constrained-fp-intrinsics.ll