This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC, test] Fix use of undef FileCheck var
ClosedPublic

Authored by thopre on Apr 4 2021, 4:12 PM.

Details

Summary

Commit 6ad3d05b681b36f6ecc98523257d154053e4116d disables the definition
of CSR that a follow-up CHECK-NOT directive depends on. This commit
replaces the undefined CSR variable use by the regex used to define it.

Diff Detail

Event Timeline

thopre created this revision.Apr 4 2021, 4:12 PM
thopre requested review of this revision.Apr 4 2021, 4:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2021, 4:12 PM
thopre updated this revision to Diff 335346.Apr 5 2021, 3:37 PM

Disable directive since it actually fails with current fix

llvm/test/CodeGen/PowerPC/ppc-shrink-wrapping.ll
682

This CHECK-NOT is way too generic. For instance here it matches align 4 in the .p2align 4 assembly. What are PowerPC's CSR?

Even the following (which enforce the first non whitespace to not be a dot and register to have a least 2 digits) fails:

CHECK-NOT: {{^ [a-z] [0-9][0-9]}}

due to addis 10, 2, .LC3@toc@ha in the function body.

thopre marked an inline comment as not done.Apr 5 2021, 3:38 PM
nemanjai accepted this revision.Apr 9 2021, 4:12 AM

Looks like when the original test was disabled, this was just omitted. Thanks for fixing it.

This revision is now accepted and ready to land.Apr 9 2021, 4:12 AM
This revision was automatically updated to reflect the committed changes.