Page MenuHomePhabricator

[SLP] Support unary FNeg vectorization
ClosedPublic

Authored by cameron.mcinally on Jun 20 2019, 9:34 AM.

Details

Summary

How should we proceed with the cost estimate for a unary FNeg? Is it worth creating a getUnaryInstrCost(...) function or similar to model this one operation?

If I'm understanding the code correctly, I've added a small change to treat a unary FNeg as a generic FP operation. That's probably not so accurate though...

Diff Detail

Repository
rL LLVM

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2019, 9:34 AM

Add two more tests (X86/propagate_ir_flags.ll).

If I'm understanding the code correctly, I've added a small change to treat a unary FNeg as a generic FP operation. That's probably not so accurate though...

Is that any different than what we have today? Ie, there's no cost model specialization for 'fsub -0.0, X'?

If I'm understanding the code correctly, I've added a small change to treat a unary FNeg as a generic FP operation. That's probably not so accurate though...

Is that any different than what we have today? Ie, there's no cost model specialization for 'fsub -0.0, X'?

Answering myself - doesn't look like anything has changed since:
D62444 / rL361788

Answering myself - doesn't look like anything has changed since:
D62444 / rL361788

Thanks for that link. I forgot that change was made.

This patch is in line with that one, expect for the constant vector tweak.

spatel accepted this revision.Jun 24 2019, 11:57 AM

LGTM

This revision is now accepted and ready to land.Jun 24 2019, 11:57 AM
Closed by commit rL364219: [SLP] Support unary FNeg vectorization (authored by mcinally, committed by ). · Explain WhyJun 24 2019, 12:25 PM
This revision was automatically updated to reflect the committed changes.