59 lines · plain
1# RUN: llc -mtriple=x86_64-gnu-linux -run-pass=machine-combiner %s -o - | FileCheck %s2 3--- |4 define float @reassoc_me(float %f1, float %f2, float %f3, float %f4) !dbg !4 {5 %add = fadd reassoc nsz float %f1, %f2, !dbg !106 %add1 = fadd reassoc nsz float %add, %f3, !dbg !107 %add2 = fadd reassoc nsz float %add1, %f4, !dbg !108 call void @llvm.dbg.value(metadata float %add2, metadata !9, metadata !DIExpression()), !dbg !109 ret float %add2, !dbg !1010 }11 12 declare void @llvm.dbg.value(metadata, metadata, metadata)13 14 !llvm.dbg.cu = !{!0}15 !llvm.module.flags = !{!2, !3}16 17 !0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "hello", isOptimized: true, emissionKind: FullDebug)18 !1 = !DIFile(filename: "reassoc.c", directory: "blah")19 !2 = !{i32 7, !"Dwarf Version", i32 4}20 !3 = !{i32 2, !"Debug Info Version", i32 3}21 !4 = distinct !DISubprogram(name: "reassoc_me", scope: !1, file: !1, line: 1, type: !5, scopeLine: 1, unit: !0, retainedNodes: !8)22 !5 = !DISubroutineType(types: !6)23 !6 = !{!7, !7, !7, !7, !7}24 !7 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)25 !8 = !{!9}26 !9 = !DILocalVariable(name: "temp3", scope: !4, file: !1, line: 4, type: !7)27 !10 = !DILocation(line: 0, scope: !4)28 29...30---31name: reassoc_me32alignment: 1633debugInstrRef: true34body: |35 bb.0 (%ir-block.0):36 liveins: $xmm0, $xmm1, $xmm2, $xmm337 38 %3:fr32 = COPY $xmm339 %2:fr32 = COPY $xmm240 %1:fr32 = COPY $xmm141 %0:fr32 = COPY $xmm042 %4:fr32 = nsz reassoc nofpexcept ADDSSrr %0, %1, implicit $mxcsr, debug-location !1043 %5:fr32 = nsz reassoc nofpexcept ADDSSrr %4, %2, implicit $mxcsr, debug-location !1044 %6:fr32 = nsz reassoc nofpexcept ADDSSrr %5, %3, implicit $mxcsr, debug-instr-number 1, debug-location !1045 DBG_INSTR_REF !9, !DIExpression(DW_OP_LLVM_arg, 0), dbg-instr-ref(1, 0), debug-location !1046 $xmm0 = COPY %6, debug-location !1047 RET 0, $xmm0, debug-location !1048 49 ; CHECK: ![[VAR:.*]] = !DILocalVariable(name: "temp3"50 ; CHECK: %[[arg3:.*]]:fr32 = COPY $xmm351 ; CHECK-NEXT: %[[arg2:.*]]:fr32 = COPY $xmm252 ; CHECK-NEXT: %[[arg1:.*]]:fr32 = COPY $xmm153 ; CHECK-NEXT: %[[arg0:.*]]:fr32 = COPY $xmm054 ; CHECK-NEXT: %[[add1:.*]]:fr32 = {{.*}} ADDSSrr %[[arg0]], %[[arg1]]55 ; CHECK-NEXT: %[[add2:.*]]:fr32 = {{.*}} ADDSSrr %[[arg2]], %[[arg3]]56 ; CHECK-NEXT: ADDSSrr %[[add1]], killed %[[add2]], {{.*}} debug-instr-number 157 ; CHECK-NEXT: DBG_INSTR_REF ![[VAR]], !DIExpression(DW_OP_LLVM_arg, 0), dbg-instr-ref(1, 0)58...59