This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add patterns matching (fabs (fsub x y)) to (fabd x y)
ClosedPublic

Authored by john.brawn on Mar 16 2018, 11:04 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

john.brawn created this revision.Mar 16 2018, 11:04 AM
t.p.northover added inline comments.Mar 16 2018, 11:13 AM
lib/Target/AArch64/AArch64InstrInfo.td
3090–3091

The 16-bit patterns should probably be guarded by a Requires = [HasNEON, HasFullFP16] clause (unless TableGen has changed so Pat instantiations inherit Requires, which actually wouldn't be a bad idea).

3407

Similar.

I'm pretty sure we never get to trying to match the patterns when we don't have FullFP16, due to differences in fp16 type legalization, but looking at AArch64GenAsmMatcher.inc there is indeed no predicate checking so it makes sense to add predicates here.

This revision is now accepted and ready to land.Apr 4 2018, 12:34 AM
This revision was automatically updated to reflect the committed changes.