This is an archive of the discontinued LLVM Phabricator instance.

[SCCP] Use constant ranges for select, if cond is overdefined.
ClosedPublic

Authored by fhahn on Dec 27 2019, 8:27 AM.

Details

Summary

For selects with an unknown condition, we can approximate the result by
merging the state of both options. This automatically takes care of
the case where on operand is undef.

Diff Detail

Event Timeline

fhahn created this revision.Dec 27 2019, 8:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 27 2019, 8:27 AM
Herald added a subscriber: hiraditya. · View Herald Transcript

Unit tests: unknown.

clang-tidy: unknown.

clang-format: unknown.

Build artifacts: diff.json, console-log.txt

Maybe also add a testcase with a select with a ConstantExpr cond?

fhahn updated this revision to Diff 239759.Jan 22 2020, 6:28 PM

Maybe also add a testcase with a select with a ConstantExpr cond?

Add test case with ConstantExpr cond.

Unit tests: unknown.

clang-tidy: unknown.

clang-format: unknown.

Build artifacts: diff.json, console-log.txt

fhahn updated this revision to Diff 250911.Mar 17 2020, 2:41 PM

Ping. I think all required patches should have landed over the last week or so.

Rebased.

This revision is now accepted and ready to land.Mar 17 2020, 3:35 PM
This revision was automatically updated to reflect the committed changes.