Parse and print DIExpressions inline to ease IR and MIR testing
Summary:
Most DIExpressions are empty or very simple. When they are complex, they
tend to be unique, so checking them inline is reasonable.
This also avoids the need for CodeGen passes to append to the
llvm.dbg.mir named md node.
See also PR22780, for making DIExpression not be an MDNode.
Reviewers: aprantl, dexonsmith, dblaikie
Subscribers: qcolombet, javed.absar, eraman, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D37075
llvm-svn: 311594
diff --git a/llvm/test/DebugInfo/ARM/sroa-complex.ll b/llvm/test/DebugInfo/ARM/sroa-complex.ll
index 1e18686..70b787d 100644
--- a/llvm/test/DebugInfo/ARM/sroa-complex.ll
+++ b/llvm/test/DebugInfo/ARM/sroa-complex.ll
@@ -20,14 +20,14 @@
; no native double data type available.
; Test that debug info for both values survives:
; CHECK: call void @llvm.dbg.value(metadata i64 0,
- ; CHECK-SAME: metadata ![[C:.*]], metadata ![[REAL:.*]])
+ ; CHECK-SAME: metadata ![[C:[^,]*]],
+ ; CHECK-SAME: metadata !DIExpression(DW_OP_LLVM_fragment, 0, 64))
store double 0.000000e+00, double* %c.imagp, align 8, !dbg !17
; CHECK: call void @llvm.dbg.value(metadata i64 0,
- ; CHECK-SAME: metadata ![[C]], metadata ![[IMG:.*]])
+ ; CHECK-SAME: metadata ![[C]],
+ ; CHECK-SAME: metadata !DIExpression(DW_OP_LLVM_fragment, 64, 64))
ret void, !dbg !18
}
-; CHECK: ![[REAL]] = !DIExpression(DW_OP_LLVM_fragment, 0, 64)
-; CHECK: ![[IMG]] = !DIExpression(DW_OP_LLVM_fragment, 64, 64)
; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
diff --git a/llvm/test/DebugInfo/Generic/global-sra-array.ll b/llvm/test/DebugInfo/Generic/global-sra-array.ll
index e48ee74..3404403 100644
--- a/llvm/test/DebugInfo/Generic/global-sra-array.ll
+++ b/llvm/test/DebugInfo/Generic/global-sra-array.ll
@@ -24,11 +24,9 @@
; CHECK: @array.0.0 = internal unnamed_addr global i32 0, align 16, !dbg ![[EL0:.*]]
; CHECK: @array.1.0 = internal unnamed_addr global i32 0, align 8, !dbg ![[EL1:.*]]
;
-; CHECK: ![[EL0]] = !DIGlobalVariableExpression(var: ![[VAR:.*]], expr: ![[EX1:.*]])
+; CHECK: ![[EL0]] = !DIGlobalVariableExpression(var: ![[VAR:.*]], expr: !DIExpression(DW_OP_LLVM_fragment, 0, 32))
; CHECK: ![[VAR]] = distinct !DIGlobalVariable(name: "array"
-; CHECK: ![[EX1]] = !DIExpression(DW_OP_LLVM_fragment, 0, 32)
-; CHECK: ![[EL1]] = !DIGlobalVariableExpression(var: ![[VAR]], expr: ![[EX2:.*]])
-; CHECK: ![[EX2]] = !DIExpression(DW_OP_LLVM_fragment, 64, 32)
+; CHECK: ![[EL1]] = !DIGlobalVariableExpression(var: ![[VAR]], expr: !DIExpression(DW_OP_LLVM_fragment, 64, 32))
; Function Attrs: nounwind optsize ssp uwtable
diff --git a/llvm/test/DebugInfo/Generic/global-sra-struct.ll b/llvm/test/DebugInfo/Generic/global-sra-struct.ll
index e17e8cf..13293f2 100644
--- a/llvm/test/DebugInfo/Generic/global-sra-struct.ll
+++ b/llvm/test/DebugInfo/Generic/global-sra-struct.ll
@@ -22,11 +22,9 @@
; CHECK: @static_struct.0 = internal unnamed_addr global i32 0, align 8, !dbg ![[EL0:.*]]
; CHECK: @static_struct.1 = internal unnamed_addr global i64 0, align 8, !dbg ![[EL1:.*]]
-; CHECK: ![[EL0]] = !DIGlobalVariableExpression(var: ![[VAR:.*]], expr: ![[EX1:.*]])
+; CHECK: ![[EL0]] = !DIGlobalVariableExpression(var: ![[VAR:.*]], expr: !DIExpression(DW_OP_LLVM_fragment, 0, 32))
; CHECK: ![[VAR]] = distinct !DIGlobalVariable(name: "static_struct"
-; CHECK: ![[EX1]] = !DIExpression(DW_OP_LLVM_fragment, 0, 32)
-; CHECK: ![[EL1]] = !DIGlobalVariableExpression(var: ![[VAR]], expr: ![[EX2:.*]])
-; CHECK: ![[EX2]] = !DIExpression(DW_OP_LLVM_fragment, 32, 64)
+; CHECK: ![[EL1]] = !DIGlobalVariableExpression(var: ![[VAR]], expr: !DIExpression(DW_OP_LLVM_fragment, 32, 64))
@static_struct = internal global %struct.mystruct zeroinitializer, align 8, !dbg !0
diff --git a/llvm/test/DebugInfo/MIR/X86/live-debug-values-3preds.mir b/llvm/test/DebugInfo/MIR/X86/live-debug-values-3preds.mir
index ceaec8d..fb30cbd 100644
--- a/llvm/test/DebugInfo/MIR/X86/live-debug-values-3preds.mir
+++ b/llvm/test/DebugInfo/MIR/X86/live-debug-values-3preds.mir
@@ -24,12 +24,16 @@
# with clang -g -O1 -c -emit-llvm LiveDebugValues-3preds.c -S -o live-debug-values-3preds.ll
# then llc -stop-after stackmap-liveness live-debug-values-3preds.ll -o /dev/null > live-debug-values-3preds.mir
+# CHECK: ![[X_VAR:[0-9]+]] = !DILocalVariable(name: "x", {{.*}})
+# CHECK: ![[Y_VAR:[0-9]+]] = !DILocalVariable(name: "y", {{.*}})
+# CHECK: ![[Z_VAR:[0-9]+]] = !DILocalVariable(name: "z", {{.*}})
+
# DBG_VALUE for variables "x", "y" and "z" are extended into BB#9 from its
# predecessors BB#0, BB#2 and BB#8.
# CHECK: bb.9.for.end:
-# CHECK-DAG: DBG_VALUE debug-use %edi, debug-use _, !11, !16, debug-location !17
-# CHECK-DAG: DBG_VALUE debug-use %edx, debug-use _, !13, !16, debug-location !20
-# CHECK-DAG: DBG_VALUE debug-use %esi, debug-use _, !12, !16, debug-location !18
+# CHECK-DAG: DBG_VALUE debug-use %edi, debug-use _, ![[X_VAR]], !DIExpression(), debug-location !{{[0-9]+}}
+# CHECK-DAG: DBG_VALUE debug-use %esi, debug-use _, ![[Y_VAR]], !DIExpression(), debug-location !{{[0-9]+}}
+# CHECK-DAG: DBG_VALUE debug-use %edx, debug-use _, ![[Z_VAR]], !DIExpression(), debug-location !{{[0-9]+}}
# CHECK: RET
--- |
diff --git a/llvm/test/DebugInfo/MIR/X86/live-debug-values-spill.mir b/llvm/test/DebugInfo/MIR/X86/live-debug-values-spill.mir
index cb89572..8b7e94f 100644
--- a/llvm/test/DebugInfo/MIR/X86/live-debug-values-spill.mir
+++ b/llvm/test/DebugInfo/MIR/X86/live-debug-values-spill.mir
@@ -47,40 +47,41 @@
# llc -stop-after=funclet-layout < spill1.ll > spill1.mir
#
# Make sure that we generated DBG_VALUE instructions for the spills
-# GENERATE: ![[MINUS48:.*]] = !DIExpression(DW_OP_constu, 48, DW_OP_minus)
-# GENERATE: ![[MINUS52:.*]] = !DIExpression(DW_OP_constu, 52, DW_OP_minus)
-# GENERATE: ![[MINUS56:.*]] = !DIExpression(DW_OP_constu, 56, DW_OP_minus)
+# GENERATE: ![[INT0:[0-9]+]] = !DILocalVariable(name: "int0",{{.*}})
+# GENERATE: ![[INTB:[0-9]+]] = !DILocalVariable(name: "intb",{{.*}})
+# GENERATE: ![[INTD:[0-9]+]] = !DILocalVariable(name: "intd",{{.*}})
+#
# GENERATE: bb.1.if.end:
# GENERATE: MOV32mr %rbp, 1, _, -48, _, killed %edx :: (store 4 into %stack.5)
-# GENERATE-NEXT: DBG_VALUE debug-use %rbp, 0, !29, ![[MINUS48]]
+# GENERATE-NEXT: DBG_VALUE debug-use %rbp, 0, ![[INT0]], !DIExpression(DW_OP_constu, 48, DW_OP_minus)
# GENERATE: MOV32mr %rbp, 1, _, -52, _, killed %r8d :: (store 4 into %stack.4)
-# GENERATE-NEXT: DBG_VALUE debug-use %rbp, 0, !35, ![[MINUS52]]
+# GENERATE-NEXT: DBG_VALUE debug-use %rbp, 0, ![[INTB]], !DIExpression(DW_OP_constu, 52, DW_OP_minus)
# GENERATE: MOV32mr %rbp, 1, _, -56, _, killed %esi :: (store 4 into %stack.3)
-# GENERATE-NEXT: DBG_VALUE debug-use %rbp, 0, !37, ![[MINUS56]]
+# GENERATE-NEXT: DBG_VALUE debug-use %rbp, 0, ![[INTD]], !DIExpression(DW_OP_constu, 56, DW_OP_minus)
#
# Check that the spill locations that are valid at the end of bb.1.if.end are
# propagated to subsequent BBs.
#
# GENERATE: bb.2.if.then4:
# GENERATE-NOT: bb.3:
-# GENERATE-DAG: DBG_VALUE debug-use %rbp, 0, !37, ![[MINUS56]]
-# GENERATE-DAG: DBG_VALUE debug-use %rbp, 0, !35, ![[MINUS52]]
+# GENERATE-DAG: DBG_VALUE debug-use %rbp, 0, ![[INTD]], !DIExpression(DW_OP_constu, 56, DW_OP_minus)
+# GENERATE-DAG: DBG_VALUE debug-use %rbp, 0, ![[INTB]], !DIExpression(DW_OP_constu, 52, DW_OP_minus)
#
# GENERATE: bb.3:
# GENERATE-NOT: bb.4.if.end13:
-# GENERATE-DAG: DBG_VALUE debug-use %rbp, 0, !37, ![[MINUS56]]
-# GENERATE-DAG: DBG_VALUE debug-use %rbp, 0, !35, ![[MINUS52]]
+# GENERATE-DAG: DBG_VALUE debug-use %rbp, 0, ![[INTD]], !DIExpression(DW_OP_constu, 56, DW_OP_minus)
+# GENERATE-DAG: DBG_VALUE debug-use %rbp, 0, ![[INTB]], !DIExpression(DW_OP_constu, 52, DW_OP_minus)
#
# GENERATE: bb.4.if.end13:
# GENERATE-NOT: bb.5.cleanup:
-# GENERATE-DAG: DBG_VALUE debug-use %rbp, 0, !37, ![[MINUS56]]
-# GENERATE-DAG: DBG_VALUE debug-use %rbp, 0, !35, ![[MINUS52]]
+# GENERATE-DAG: DBG_VALUE debug-use %rbp, 0, ![[INTD]], !DIExpression(DW_OP_constu, 56, DW_OP_minus)
+# GENERATE-DAG: DBG_VALUE debug-use %rbp, 0, ![[INTB]], !DIExpression(DW_OP_constu, 52, DW_OP_minus)
#
# Check that the spill location rbp-48 (the variable int0) is not propagated
# because int0 is redefined within the same basic block.
#
# TERMINATE: bb.2.if.then4:
-# TERMINATE-NOT: DBG_VALUE debug-use %rbp, -48, !26, !38
+# TERMINATE-NOT: DBG_VALUE debug-use %rbp, -48,
--- |
; ModuleID = '<stdin>'
source_filename = "spill1.c"
diff --git a/llvm/test/DebugInfo/MIR/X86/live-debug-values.mir b/llvm/test/DebugInfo/MIR/X86/live-debug-values.mir
index d9daa46..e8e0777 100644
--- a/llvm/test/DebugInfo/MIR/X86/live-debug-values.mir
+++ b/llvm/test/DebugInfo/MIR/X86/live-debug-values.mir
@@ -32,8 +32,10 @@
# DBG_VALUE for variable "n" is extended into BB#5 from its predecessors BB#3
# and BB#4.
+# CHECK: ![[N_VAR:[0-9]+]] = !DILocalVariable(name: "n",{{.*}})
+#
# CHECK: bb.5.if.end.7:
-# CHECK: DBG_VALUE debug-use %ebx, debug-use _, !19, !20, debug-location !33
+# CHECK: DBG_VALUE debug-use %ebx, debug-use _, ![[N_VAR]], !DIExpression(), debug-location !{{[0-9]+}}
--- |
diff --git a/llvm/test/DebugInfo/MIR/X86/livedebugvalues-limit.mir b/llvm/test/DebugInfo/MIR/X86/livedebugvalues-limit.mir
index 4c87543..b95b02a 100644
--- a/llvm/test/DebugInfo/MIR/X86/livedebugvalues-limit.mir
+++ b/llvm/test/DebugInfo/MIR/X86/livedebugvalues-limit.mir
@@ -13,14 +13,25 @@
; This test verifies that LiveDebugValues doesn't propagate DBG_VALUEs into
; basic blocks that are beyond the scope of the source variable.
;
+ ; CHECK: ![[F_SP:[0-9]+]] = distinct !DISubprogram(name: "f", {{.*}})
+ ; CHECK: ![[A_VAR:[0-9]+]] = !DILocalVariable(name: "a",{{.*}})
+ ; CHECK: ![[I_VAR:[0-9]+]] = !DILocalVariable(name: "i",{{.*}})
+ ; CHECK: ![[I_LOC:[0-9]+]] = !DILocation(line: 4, column: 14, scope: !{{[0-9]+}})
+ ; CHECK: ![[INLCS1:[0-9]+]] = !DILocation(line: 3, column: 41, scope: ![[F_SP]], inlinedAt: ![[CS1:[0-9]+]])
+ ; CHECK: ![[CS1]] = distinct !DILocation(line: 5, column: 3, scope: !{{[0-9]+}})
+ ; CHECK: ![[INLCS2:[0-9]+]] = !DILocation(line: 3, column: 41, scope: ![[F_SP]], inlinedAt: ![[CS2:[0-9]+]])
+ ; CHECK: ![[CS2]] = distinct !DILocation(line: 7, column: 5, scope: !{{[0-9]+}})
+ ; CHECK: ![[INLCS3:[0-9]+]] = !DILocation(line: 3, column: 41, scope: ![[F_SP]], inlinedAt: ![[CS3:[0-9]+]])
+ ; CHECK: ![[CS3]] = distinct !DILocation(line: 8, column: 3, scope: !{{[0-9]+}})
+ ;
; CHECK: bb.1.if.then:
- ; CHECK: DBG_VALUE debug-use %ebx, debug-use _, !19, !13, debug-location !20
- ; CHECK-NOT: DBG_VALUE debug-use %ebx, debug-use _, !12, !13, debug-location !21
- ; CHECK: DBG_VALUE debug-use %ebx, debug-use _, !12, !13, debug-location !27
+ ; CHECK: DBG_VALUE debug-use %ebx, debug-use _, ![[I_VAR]], !DIExpression(), debug-location ![[I_LOC]]
+ ; CHECK-NOT: DBG_VALUE debug-use %ebx, debug-use _, ![[A_VAR]], !DIExpression(), debug-location
+ ; CHECK: DBG_VALUE debug-use %ebx, debug-use _, ![[A_VAR]], !DIExpression(), debug-location ![[INLCS2]]
; CHECK: bb.2.if.end:
- ; CHECK: DBG_VALUE debug-use %ebx, debug-use _, !19, !13, debug-location !20
- ; CHECK-NOT: DBG_VALUE debug-use %ebx, debug-use _, !12, !13, debug-location !21
- ; CHECK: DBG_VALUE debug-use %ebx, debug-use _, !12, !13, debug-location !31
+ ; CHECK: DBG_VALUE debug-use %ebx, debug-use _, ![[I_VAR]], !DIExpression(), debug-location ![[I_LOC]]
+ ; CHECK-NOT: DBG_VALUE debug-use %ebx, debug-use _, ![[A_VAR]], !DIExpression(), debug-location
+ ; CHECK: DBG_VALUE debug-use %ebx, debug-use _, ![[A_VAR]], !DIExpression(), debug-location ![[INLCS3]]
;
; ModuleID = 'livedebugvalues-limit.ll'
source_filename = "livedebugvalues-limit.c"
diff --git a/llvm/test/DebugInfo/MSP430/sdagsplit-1.ll b/llvm/test/DebugInfo/MSP430/sdagsplit-1.ll
index a4f5c05..1200aa0 100644
--- a/llvm/test/DebugInfo/MSP430/sdagsplit-1.ll
+++ b/llvm/test/DebugInfo/MSP430/sdagsplit-1.ll
@@ -13,14 +13,10 @@
; return 0;
; }
;
-; CHECK: ![[MDN1:[0-9]+]] = !DIExpression(DW_OP_LLVM_fragment, 32, 16)
-; CHECK: ![[MDN2:[0-9]+]] = !DIExpression(DW_OP_LLVM_fragment, 48, 16)
-; CHECK: ![[MDN3:[0-9]+]] = !DIExpression(DW_OP_LLVM_fragment, 0, 16)
-; CHECK: ![[MDN4:[0-9]+]] = !DIExpression(DW_OP_LLVM_fragment, 16, 16)
-; CHECK-DAG: DBG_VALUE debug-use %r{{[0-9]+}}, debug-use _, !{{[0-9]+}}, ![[MDN1]], debug-location !{{[0-9]+}}
-; CHECK-DAG: DBG_VALUE debug-use %r{{[0-9]+}}, debug-use _, !{{[0-9]+}}, ![[MDN2]], debug-location !{{[0-9]+}}
-; CHECK-DAG: DBG_VALUE debug-use %r{{[0-9]+}}, debug-use _, !{{[0-9]+}}, ![[MDN3]], debug-location !{{[0-9]+}}
-; CHECK-DAG: DBG_VALUE debug-use %r{{[0-9]+}}, debug-use _, !{{[0-9]+}}, ![[MDN4]], debug-location !{{[0-9]+}}
+; CHECK-DAG: DBG_VALUE debug-use %r{{[0-9]+}}, debug-use _, !{{[0-9]+}}, !DIExpression(DW_OP_LLVM_fragment, 32, 16), debug-location !{{[0-9]+}}
+; CHECK-DAG: DBG_VALUE debug-use %r{{[0-9]+}}, debug-use _, !{{[0-9]+}}, !DIExpression(DW_OP_LLVM_fragment, 48, 16), debug-location !{{[0-9]+}}
+; CHECK-DAG: DBG_VALUE debug-use %r{{[0-9]+}}, debug-use _, !{{[0-9]+}}, !DIExpression(DW_OP_LLVM_fragment, 0, 16), debug-location !{{[0-9]+}}
+; CHECK-DAG: DBG_VALUE debug-use %r{{[0-9]+}}, debug-use _, !{{[0-9]+}}, !DIExpression(DW_OP_LLVM_fragment, 16, 16), debug-location !{{[0-9]+}}
; ModuleID = 'sdagsplit-1.c'
target datalayout = "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16"
diff --git a/llvm/test/DebugInfo/X86/array2.ll b/llvm/test/DebugInfo/X86/array2.ll
index 60a486f..343b266 100644
--- a/llvm/test/DebugInfo/X86/array2.ll
+++ b/llvm/test/DebugInfo/X86/array2.ll
@@ -16,9 +16,8 @@
; Test that we correctly lower dbg.declares for arrays.
;
; CHECK: define i32 @main
-; CHECK: call void @llvm.dbg.value(metadata i32 42, metadata ![[ARRAY:[0-9]+]], metadata ![[EXPR:[0-9]+]])
+; CHECK: call void @llvm.dbg.value(metadata i32 42, metadata ![[ARRAY:[0-9]+]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32))
; CHECK: ![[ARRAY]] = !DILocalVariable(name: "array",{{.*}} line: 6
-; CHECK: ![[EXPR]] = !DIExpression(DW_OP_LLVM_fragment, 0, 32)
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.9.0"
diff --git a/llvm/test/DebugInfo/X86/bbjoin.ll b/llvm/test/DebugInfo/X86/bbjoin.ll
index d9d0b17..4cb9941 100644
--- a/llvm/test/DebugInfo/X86/bbjoin.ll
+++ b/llvm/test/DebugInfo/X86/bbjoin.ll
@@ -9,11 +9,10 @@
; ++x;
; return x; // check that x is not a constant here.
; }
-; CHECK: ![[EXPR:.*]] = !DIExpression(DW_OP_plus_uconst, 4, DW_OP_deref)
; CHECK: ![[X:.*]] = !DILocalVariable(name: "x",
; CHECK: bb.0.entry:
; CHECK: DBG_VALUE 23, 0, ![[X]],
-; CHECK: DBG_VALUE %rsp, 0, ![[X]], ![[EXPR]],
+; CHECK: DBG_VALUE %rsp, 0, ![[X]], !DIExpression(DW_OP_plus_uconst, 4, DW_OP_deref),
; CHECK: bb.1.if.then:
; CHECK: DBG_VALUE 43, 0, ![[X]],
; CHECK: bb.2.if.end:
diff --git a/llvm/test/DebugInfo/X86/safestack-byval.ll b/llvm/test/DebugInfo/X86/safestack-byval.ll
index 65ce447..aa42eb3 100644
--- a/llvm/test/DebugInfo/X86/safestack-byval.ll
+++ b/llvm/test/DebugInfo/X86/safestack-byval.ll
@@ -14,8 +14,7 @@
; }
; CHECK: ![[ZZZ:.*]] = !DILocalVariable(name: "zzz",
-; CHECK: ![[ZZZ_EXPR:.*]] = !DIExpression(DW_OP_deref, DW_OP_constu, 400, DW_OP_minus)
-; CHECK: DBG_VALUE {{.*}} ![[ZZZ]], ![[ZZZ_EXPR]]
+; CHECK: DBG_VALUE {{.*}} ![[ZZZ]], !DIExpression(DW_OP_deref, DW_OP_constu, 400, DW_OP_minus)
%struct.S = type { [100 x i32] }
diff --git a/llvm/test/DebugInfo/X86/sdagsplit-1.ll b/llvm/test/DebugInfo/X86/sdagsplit-1.ll
index 1e68632..6e65c15 100644
--- a/llvm/test/DebugInfo/X86/sdagsplit-1.ll
+++ b/llvm/test/DebugInfo/X86/sdagsplit-1.ll
@@ -13,10 +13,8 @@
; return 0;
; }
;
-; CHECK: ![[MDN1:[0-9]+]] = !DIExpression(DW_OP_LLVM_fragment, 0, 32)
-; CHECK: ![[MDN2:[0-9]+]] = !DIExpression(DW_OP_LLVM_fragment, 32, 32)
-; CHECK-DAG: DBG_VALUE debug-use %{{[a-z]+}}, debug-use _, !{{[0-9]+}}, ![[MDN1]], debug-location !{{[0-9]+}}
-; CHECK-DAG: DBG_VALUE debug-use %{{[a-z]+}}, debug-use _, !{{[0-9]+}}, ![[MDN2]], debug-location !{{[0-9]+}}
+; CHECK-DAG: DBG_VALUE debug-use %{{[a-z]+}}, debug-use _, !{{[0-9]+}}, !DIExpression(DW_OP_LLVM_fragment, 0, 32), debug-location !{{[0-9]+}}
+; CHECK-DAG: DBG_VALUE debug-use %{{[a-z]+}}, debug-use _, !{{[0-9]+}}, !DIExpression(DW_OP_LLVM_fragment, 32, 32), debug-location !{{[0-9]+}}
; ModuleID = 'sdagsplit-1.c'
target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
diff --git a/llvm/test/DebugInfo/X86/sroasplit-1.ll b/llvm/test/DebugInfo/X86/sroasplit-1.ll
index ffe0434..bd431a1e 100644
--- a/llvm/test/DebugInfo/X86/sroasplit-1.ll
+++ b/llvm/test/DebugInfo/X86/sroasplit-1.ll
@@ -21,13 +21,11 @@
; Verify that SROA creates a variable piece when splitting i1.
; CHECK: %[[I1:.*]] = alloca [12 x i8], align 4
-; CHECK: call void @llvm.dbg.declare(metadata [12 x i8]* %[[I1]], metadata ![[VAR:[0-9]+]], metadata ![[PIECE1:[0-9]+]])
-; CHECK: call void @llvm.dbg.value(metadata i32 %[[A:.*]], metadata ![[VAR]], metadata ![[PIECE2:[0-9]+]])
+; CHECK: call void @llvm.dbg.declare(metadata [12 x i8]* %[[I1]], metadata ![[VAR:[0-9]+]], metadata !DIExpression(DW_OP_LLVM_fragment, 32, 96))
+; CHECK: call void @llvm.dbg.value(metadata i32 %[[A:.*]], metadata ![[VAR]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32))
; CHECK: ret i32 %[[A]]
; Read Var and Piece:
; CHECK: ![[VAR]] = !DILocalVariable(name: "i1",{{.*}} line: 11,
-; CHECK: ![[PIECE1]] = !DIExpression(DW_OP_LLVM_fragment, 32, 96)
-; CHECK: ![[PIECE2]] = !DIExpression(DW_OP_LLVM_fragment, 0, 32)
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.9.0"
diff --git a/llvm/test/DebugInfo/X86/sroasplit-2.ll b/llvm/test/DebugInfo/X86/sroasplit-2.ll
index be93a33..b2bec7ced 100644
--- a/llvm/test/DebugInfo/X86/sroasplit-2.ll
+++ b/llvm/test/DebugInfo/X86/sroasplit-2.ll
@@ -20,14 +20,11 @@
;
; Verify that SROA creates a variable piece when splitting i1.
-; CHECK: call void @llvm.dbg.value(metadata i64 %outer.coerce0, metadata ![[O:[0-9]+]], metadata ![[PIECE1:[0-9]+]]),
-; CHECK: call void @llvm.dbg.value(metadata i64 %outer.coerce1, metadata ![[O]], metadata ![[PIECE2:[0-9]+]]),
-; CHECK: call void @llvm.dbg.value({{.*}}, metadata ![[I1:[0-9]+]], metadata ![[PIECE3:[0-9]+]]),
+; CHECK: call void @llvm.dbg.value(metadata i64 %outer.coerce0, metadata ![[O:[0-9]+]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 64)),
+; CHECK: call void @llvm.dbg.value(metadata i64 %outer.coerce1, metadata ![[O]], metadata !DIExpression(DW_OP_LLVM_fragment, 64, 64)),
+; CHECK: call void @llvm.dbg.value({{.*}}, metadata ![[I1:[0-9]+]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32)),
; CHECK-DAG: ![[O]] = !DILocalVariable(name: "outer",{{.*}} line: 10
-; CHECK-DAG: ![[PIECE1]] = !DIExpression(DW_OP_LLVM_fragment, 0, 64)
-; CHECK-DAG: ![[PIECE2]] = !DIExpression(DW_OP_LLVM_fragment, 64, 64)
; CHECK-DAG: ![[I1]] = !DILocalVariable(name: "i1",{{.*}} line: 11
-; CHECK-DAG: ![[PIECE3]] = !DIExpression(DW_OP_LLVM_fragment, 0, 32)
; ModuleID = 'sroasplit-2.c'
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
diff --git a/llvm/test/DebugInfo/X86/sroasplit-3.ll b/llvm/test/DebugInfo/X86/sroasplit-3.ll
index 5617526..e11e31c 100644
--- a/llvm/test/DebugInfo/X86/sroasplit-3.ll
+++ b/llvm/test/DebugInfo/X86/sroasplit-3.ll
@@ -3,10 +3,8 @@
; Test that SROA updates the debug info correctly if an alloca was rewritten but
; not partitioned into multiple allocas.
;
-; CHECK: call void @llvm.dbg.value(metadata float %s.coerce, metadata ![[VAR:[0-9]+]], metadata ![[EXPR:[0-9]+]])
+; CHECK: call void @llvm.dbg.value(metadata float %s.coerce, metadata ![[VAR:[0-9]+]], metadata !DIExpression())
; CHECK: ![[VAR]] = !DILocalVariable(name: "s",{{.*}} line: 3,
-; CHECK: ![[EXPR]] = !DIExpression(
-; CHECK-NOT: DW_OP_LLVM_fragment
;
; struct S { float f; };
diff --git a/llvm/test/DebugInfo/X86/sroasplit-4.ll b/llvm/test/DebugInfo/X86/sroasplit-4.ll
index 5ae6503..718dc9b 100644
--- a/llvm/test/DebugInfo/X86/sroasplit-4.ll
+++ b/llvm/test/DebugInfo/X86/sroasplit-4.ll
@@ -2,15 +2,11 @@
;
; Test that recursively splitting an alloca updates the debug info correctly.
; CHECK: %[[T:.*]] = load i64, i64* @t, align 8
-; CHECK: call void @llvm.dbg.value(metadata i64 %[[T]], metadata ![[Y:.*]], metadata ![[P1:.*]])
+; CHECK: call void @llvm.dbg.value(metadata i64 %[[T]], metadata ![[Y:.*]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 64))
; CHECK: %[[T1:.*]] = load i64, i64* @t, align 8
-; CHECK: call void @llvm.dbg.value(metadata i64 %[[T1]], metadata ![[Y]], metadata ![[P2:.*]])
-; CHECK: call void @llvm.dbg.value(metadata i64 %[[T]], metadata ![[R:.*]], metadata ![[P3:.*]])
-; CHECK: call void @llvm.dbg.value(metadata i64 %[[T1]], metadata ![[R]], metadata ![[P4:.*]])
-; CHECK: ![[P1]] = !DIExpression(DW_OP_LLVM_fragment, 0, 64)
-; CHECK: ![[P2]] = !DIExpression(DW_OP_LLVM_fragment, 64, 64)
-; CHECK: ![[P3]] = !DIExpression(DW_OP_LLVM_fragment, 192, 64)
-; CHECK: ![[P4]] = !DIExpression(DW_OP_LLVM_fragment, 256, 64)
+; CHECK: call void @llvm.dbg.value(metadata i64 %[[T1]], metadata ![[Y]], metadata !DIExpression(DW_OP_LLVM_fragment, 64, 64))
+; CHECK: call void @llvm.dbg.value(metadata i64 %[[T]], metadata ![[R:.*]], metadata !DIExpression(DW_OP_LLVM_fragment, 192, 64))
+; CHECK: call void @llvm.dbg.value(metadata i64 %[[T1]], metadata ![[R]], metadata !DIExpression(DW_OP_LLVM_fragment, 256, 64))
;
; struct p {
; __SIZE_TYPE__ s;