This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Add tests for folding `fmul`/`fdiv` by Pow2 to `add`/`sub` of exp; NFC
Needs ReviewPublic

Authored by goldstein.w.n on Jul 6 2023, 8:25 PM.

Details

Diff Detail

Event Timeline

goldstein.w.n created this revision.Jul 6 2023, 8:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2023, 8:25 PM
Herald added a subscriber: StephenFan. · View Herald Transcript
goldstein.w.n requested review of this revision.Jul 6 2023, 8:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2023, 8:25 PM
arsenm added inline comments.Jul 7 2023, 3:57 AM
llvm/test/Transforms/InstCombine/fmul-and-fdiv-by-int-pow2.ll
14

Add some tests that show flag preservation on fmul/fdiv

182

Are the nuws relevant?

goldstein.w.n added inline comments.Jul 7 2023, 8:31 AM
llvm/test/Transforms/InstCombine/fmul-and-fdiv-by-int-pow2.ll
14

Hmm? Can you link to example or reference?

182

They get added anyways for (shl 1, cnt). They are used to make non-zero status easy to determine.