This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] Make sure that combineGET_CCMASK() can handle a truncated SELECT_CCMASK.
ClosedPublic

Authored by jonpa on Nov 18 2022, 1:04 PM.

Details

Summary

In cases where the SELECT_CCMASK has an additional user of the the carry a truncated SELECT_CCMASK may result as the input to a GET_CCMASK. This patch adds capability to combineGET_CCMASK() to recognize and handle these cases.

Fixes https://github.com/llvm/llvm-project/issues/59054.

Diff Detail

Event Timeline

jonpa created this revision.Nov 18 2022, 1:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2022, 1:04 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
jonpa requested review of this revision.Nov 18 2022, 1:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2022, 1:04 PM

Looking into this a bit more, the argument to GET_CCMASK is known to be a boolean value (either 0 or 1), so we don't need to verify that after all, and can just accept truncates in general.

jonpa updated this revision to Diff 477275.Nov 22 2022, 12:34 PM

Updated per review.

uweigand accepted this revision.Nov 23 2022, 2:04 AM

LGTM, thanks!

This revision is now accepted and ready to land.Nov 23 2022, 2:04 AM