This is an archive of the discontinued LLVM Phabricator instance.

[AggressiveInstCombine] Fold strcmp for short string literals tests
ClosedPublic

Authored by kitaisreal on Jul 12 2023, 2:25 AM.

Diff Detail

Event Timeline

kitaisreal created this revision.Jul 12 2023, 2:25 AM
kitaisreal requested review of this revision.Jul 12 2023, 2:25 AM

fold -> expand? or inline?

We are not folding anything, right?

Thanks. Expand is much better than fold.

Rename fold into expand.

xbolva00 added inline comments.Jul 12 2023, 3:40 AM
llvm/test/Transforms/AggressiveInstCombine/strcmp.ll
10

Add test with different lengths of string literals,
x, xx, xxxx, etc

Added tests for different string sizes.

kitaisreal marked an inline comment as done.Jul 12 2023, 5:20 AM

Updated tests.

Updated tests.

nikic accepted this revision.Jul 18 2023, 11:27 AM

LGTM

llvm/test/Transforms/AggressiveInstCombine/strcmp.ll
21

Drop all the noundef attributes, they shouldn't be relevant for this transform.

This revision is now accepted and ready to land.Jul 18 2023, 11:27 AM
This revision was landed with ongoing or failed builds.Jul 19 2023, 7:54 AM
This revision was automatically updated to reflect the committed changes.