forked from OSchip/llvm-project
Make test resistant to false matches of numbered (unnamed) labels inside other numbers.
In release builds labels are numbers. Matching just the number may result in false matches where the label is contained in other numbers, such as 14 inside [114 x i8]. A stricter match requiring start of line or > character before the label avoids these false matches. llvm-svn: 246385
This commit is contained in:
parent
fc600dc2ec
commit
43e184ee0c
|
@ -7,19 +7,24 @@ int f(int x, int y) {
|
|||
// CHECK: %[[B4:.*]] = or i1 %[[B2]], %[[B3]]
|
||||
// CHECK: br i1 %[[B1]], label %[[L1:[0-9a-z_.]*]], label %[[L2:[0-9a-z_.]*]]
|
||||
|
||||
// CHECK: [[L2]]
|
||||
// {{^|>}} used to match both Debug form of the captured label
|
||||
// cont:
|
||||
// and Release form
|
||||
// ; <label>14
|
||||
// But avoids false matches inside other numbers such as [114 x i8].
|
||||
// CHECK: {{^|>}}[[L2]]
|
||||
// CHECK-NEXT: call void @llvm.trap()
|
||||
// CHECK-NEXT: unreachable
|
||||
|
||||
// CHECK: [[L1]]
|
||||
// CHECK: {{^|>}}[[L1]]
|
||||
// CHECK-NEXT: br i1 %[[B4]], label %[[L3:[0-9a-z_.]*]], label %[[L4:[0-9a-z_.]*]]
|
||||
|
||||
// CHECK: [[L4]]
|
||||
// CHECK: {{^|>}}[[L4]]
|
||||
// CHECK-NEXT: zext
|
||||
// CHECK-NEXT: zext
|
||||
// CHECK-NEXT: __ubsan_handle_divrem_overflow
|
||||
|
||||
// CHECK: [[L3]]
|
||||
// CHECK: {{^|>}}[[L3]]
|
||||
// CHECK-NEXT: sdiv i32 %[[N]], %[[D]]
|
||||
return x / y;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue