This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][FPenv] Update chain of int to fp conversion
ClosedPublic

Authored by dnsampaio on Feb 14 2020, 2:10 AM.

Details

Summary

When using strict fp, it is required to update the
chain when performing integer type promotion of a
operand to a integer to floating point conversion.

Diff Detail

Event Timeline

dnsampaio created this revision.Feb 14 2020, 2:10 AM
john.brawn added inline comments.Feb 14 2020, 4:17 AM
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
1244–1245

Instead of setting this per-opcode in the switch, it would be simpler to do

bool IsStrict = N->isStrictFPOpcode()

and then use IsStrict to decide if there's another result. This is also more similar to how we handle strict opcodes elsewhere in legalization.

llvm/test/CodeGen/AArch64/strict-fp-int-promote.mir
67 ↗(On Diff #244596)

It would be good to have a test of uitfp as well. Also, is there any specific reason this is a .mir test instead of a .ll test?

dnsampaio updated this revision to Diff 244670.EditedFeb 14 2020, 8:03 AM
dnsampaio marked an inline comment as done.

Changes requested: IR test, chain changed depending on isStrictFPOpcode, signed and unsigned tests

dnsampaio marked 2 inline comments as done.Feb 14 2020, 8:04 AM
This revision is now accepted and ready to land.Feb 14 2020, 5:04 PM
This revision was automatically updated to reflect the committed changes.