This is an archive of the discontinued LLVM Phabricator instance.

[AArch32] Add support for FP rounding operations for ARMv8/AArch32.
ClosedPublic

Authored by mcrosier on Aug 15 2014, 11:59 AM.

Details

Summary

This patch adds support for various FP rounding operations on ARMv8/AArch32.

Please take a look.

Regards,

Chad

Diff Detail

Event Timeline

mcrosier updated this revision to Diff 12566.Aug 15 2014, 11:59 AM
mcrosier retitled this revision from to [AArch32] Add support for FP rounding operations for ARMv8/AArch32..
mcrosier updated this object.
mcrosier edited the test plan for this revision. (Show Details)
mcrosier added a subscriber: Unknown Object (MLST).
compnerd added inline comments.
lib/Target/ARM/ARMISelLowering.cpp
861

Whitespace between the MVT and closing brace.

862

It seems that range based loops would be nicer here.

lib/Target/ARM/ARMInstrVFP.td
694

Can there ever be the case that there is no desired pattern? (e.g. does it make sense to have this be a default null_frag).

mcrosier added inline comments.Aug 15 2014, 12:51 PM
lib/Target/ARM/ARMISelLowering.cpp
861

I'll take care of it.

862

Ok, no problem.

lib/Target/ARM/ARMInstrVFP.td
694

Not with the current state of the compiler. This multiclass is for
VRINTZ => maps to => ISD::FTRUNC
VRINTR => maps to => ISD::FNEARBYINT
VRINTX => maps to => ISD::FRINT.

The only case I can think of where we need a default null_frag, is if we extend this in the future for accommodating other instructions which do not have a corresponding DAG node/pattern.

e.g. defm VRINTY : vrint_inst_zrxy <"x….

IMO, we should defer such a change until it is necessary.

test/CodeGen/ARM/arm32-rounding.ll
112

I'll remove this extra whitespace as well.

mcrosier updated this revision to Diff 12572.Aug 15 2014, 1:17 PM

Updated based on compnerd's feedback!

mcrosier updated this revision to Diff 12573.Aug 15 2014, 2:23 PM

Use range based loop.

compnerd accepted this revision.Aug 15 2014, 2:41 PM
compnerd added a reviewer: compnerd.
This revision is now accepted and ready to land.Aug 15 2014, 2:41 PM
mcrosier closed this revision.Aug 17 2014, 9:23 AM

Committed r215772.