This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Allow strict opcodes in faddp patterns

Authored by john.brawn on Jan 28 2022, 9:44 AM.



This also requires adjustment to code in AArch64ISelLowering so that vector_extract is distributed over strict_fadd.

Diff Detail

Event Timeline

john.brawn created this revision.Jan 28 2022, 9:44 AM
john.brawn requested review of this revision.Jan 28 2022, 9:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2022, 9:44 AM
john.brawn planned changes to this revision.Jan 31 2022, 8:13 AM

The performExtractVectorEltCombine transformation doesn't work correctly when D115352 is applied (it causes there to be an extra add instruction) which I need to look into.

john.brawn updated this revision to Diff 406799.Feb 8 2022, 6:42 AM

Morph the strict_fadd instead of creating a new one, so that we don't end up with two strict_fadd nodes (as both would be kept when exceptions are enabled).

dmgreen added inline comments.Feb 8 2022, 10:29 AM

I don't think you can use MorphNodeTo here. It has a comment about it in the description of the function.

Can it just use one of the ReplaceAllUsesWith/ReplaceAllUsesOfValueWith/CombineTo/etc methods? As far as I understand it needs to replace the old Chain (from N0) with the new one.

Use ReplaceAllUsesOfValueWith instead of MorphNode.

dmgreen accepted this revision.Feb 11 2022, 11:20 AM

Thanks. LGTM

This revision is now accepted and ready to land.Feb 11 2022, 11:20 AM
This revision was landed with ongoing or failed builds.Feb 17 2022, 5:12 AM
This revision was automatically updated to reflect the committed changes.