[all-commits] [llvm/llvm-project] c47023: [clang][CodeGen] Make pragma-loop test more rboust...
Ryotaro Kasuga via All-commits
all-commits at lists.llvm.org
Tue Apr 1 23:40:58 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c47023dceb11fcb06c2405ea11eca10ea1139aa0
https://github.com/llvm/llvm-project/commit/c47023dceb11fcb06c2405ea11eca10ea1139aa0
Author: Ryotaro Kasuga <kasuga.ryotaro at fujitsu.com>
Date: 2025-04-02 (Wed, 02 Apr 2025)
Changed paths:
M clang/test/CodeGenCXX/pragma-loop.cpp
Log Message:
-----------
[clang][CodeGen] Make pragma-loop test more rboust (NFC) (#133707)
pragma-loop.cpp contains tests for loop metadata generated by pragma
directives. These tests didn't work as (perhaps) expected. This is
because the regex `.*` consumes multiple elements in the metadata. For
example, there was a check directive like this.
```
// CHECK: ![[LOOP_9]] = distinct !{![[LOOP_9]], ![[WIDTH_8:.*]], ![[FIXED_VEC]], ...}
```
In the above case, `[[WIDTH_8]]` would have been expected to match a
node like `[[WIDTH_8]] = !{!"llvm.loop.vectorize.width", i32 8}`.
However, since there is no check directive to verify the contents of
`[[WIDTH_8]]`, the regex `.*` consumed more than one element. There were
other similar cases.
This patch fixes the problem by not using regex matcher in the metadata
content (except for follow-up metadata). Instead, it uses string
variables whose contents are validated elsewhere.
Related:
https://github.com/llvm/llvm-project/pull/131985#discussion_r2014369699
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list