This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] optimized implementations of min/max for bool
ClosedPublic

Authored by Qi-Hu on Aug 25 2023, 4:50 PM.

Diff Detail

Event Timeline

Qi-Hu created this revision.Aug 25 2023, 4:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2023, 4:50 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
Qi-Hu requested review of this revision.Aug 25 2023, 4:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2023, 4:50 PM

Can you precommitnthe tests?

nikic added a subscriber: nikic.Aug 26 2023, 12:18 AM
nikic added inline comments.
llvm/test/Transforms/InstCombine/fold-minmax-i1.ll
1

Use update_test_checks.py.

34

Missing vector test.

nikic edited reviewers, added: nikic, goldstein.w.n; removed: bryanpkc.Aug 26 2023, 12:20 AM

Please attach alive2 proofs to the patch description.

Qi-Hu updated this revision to Diff 554466.Aug 29 2023, 12:51 PM
Qi-Hu edited the summary of this revision. (Show Details)
Qi-Hu marked an inline comment as done.
Qi-Hu marked an inline comment as done.Aug 29 2023, 12:52 PM
Qi-Hu added a comment.Aug 29 2023, 2:50 PM

Can you precommitnthe tests?

The pre-commit test is here: D159129.

Can you precommitnthe tests?

The pre-commit test is here: D159129.

Can you put it in a series.

Go to the "Edit Related Revisions" tab and set the test commit as the parent of this one.

RKSimon added inline comments.
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
1634

remove superfluous brackets: II->getType()->isIntOrIntVectorTy(1)

1641

remove superfluous brackets: II->getType()->isIntOrIntVectorTy(1)

Qi-Hu updated this revision to Diff 554775.Aug 30 2023, 10:38 AM
goldstein.w.n added inline comments.Aug 30 2023, 11:52 AM
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
1645

If you remove the bracket, can you move the comments to before the if. Non-bracket if with multiline comments before statement are a bit error-prone imo.

Qi-Hu updated this revision to Diff 555045.Aug 31 2023, 7:39 AM
Qi-Hu marked an inline comment as done.
Qi-Hu marked 2 inline comments as done.
This revision is now accepted and ready to land.Aug 31 2023, 10:41 AM
bryanpkc added inline comments.
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
1636

This line is not indented correctly; please clang-format the if statement.

1643

This line is not indented correctly; please clang-format the if statement.

Qi-Hu updated this revision to Diff 556075.Sep 6 2023, 1:33 PM
Qi-Hu marked 2 inline comments as done.
bryanpkc accepted this revision.Sep 7 2023, 7:12 AM
This revision was landed with ongoing or failed builds.Sep 7 2023, 7:19 AM
This revision was automatically updated to reflect the committed changes.