<p dir="ltr"><br>
On Oct 20, 2014 6:28 PM, "Rafael Espindola" <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br>
><br>
> Author: rafael<br>
> Date: Mon Oct 20 20:17:30 2014<br>
> New Revision: 220256<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=220256&view=rev">http://llvm.org/viewvc/llvm-project?rev=220256&view=rev</a><br>
> Log:<br>
> Fix a bit of confusion about .set and produce more readable assembly.<br>
><br>
> Every target we support has support for assembly that looks like<br>
><br>
> a = b - c<br>
> .long a<br>
><br>
> What is special about MachO is that the above combination suppresses the<br>
> production of a relocation.<br>
><br>
> With this change we avoid producing the intermediary labels when they don't<br>
> add any value.</p>
<p dir="ltr">Yay. Should make a few (admittedly sub optimal) tests more stable in the presence of additions/removals of these expressions.</p>
<p dir="ltr">><br>
> Modified:<br>
> llvm/trunk/include/llvm/MC/MCAsmInfo.h<br>
> llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp<br>
> llvm/trunk/lib/MC/MCAsmInfo.cpp<br>
> llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp<br>
> llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp<br>
> llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp<br>
> llvm/trunk/lib/Target/X86/X86MCInstLower.cpp<br>
> llvm/trunk/test/CodeGen/AArch64/jump-table.ll<br>
> llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll<br>
> llvm/trunk/test/CodeGen/X86/patchpoint-invoke.ll<br>
> llvm/trunk/test/CodeGen/XCore/exception.ll<br>
> llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll<br>
> llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll<br>
> llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll<br>
> llvm/trunk/test/DebugInfo/X86/pr19307.ll<br>
><br>
> Modified: llvm/trunk/include/llvm/MC/MCAsmInfo.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmInfo.h?rev=220256&r1=220255&r2=220256&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmInfo.h?rev=220256&r1=220255&r2=220256&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/include/llvm/MC/MCAsmInfo.h (original)<br>
> +++ llvm/trunk/include/llvm/MC/MCAsmInfo.h Mon Oct 20 20:17:30 2014<br>
> @@ -223,8 +223,12 @@ protected:<br>
> /// This is the directive used to declare a global entity. Defaults to NULL.<br>
> const char *GlobalDirective;<br>
><br>
> - /// True if the assembler supports the .set directive. Defaults to true.<br>
> - bool HasSetDirective;<br>
> + /// True if the expression<br>
> + /// .long f - g<br>
> + /// uses an relocation but it can be supressed by writting<br>
> + /// a = f - g<br>
> + /// .long a<br>
> + bool SetDirectiveSuppressesReloc;<br>
><br>
> /// False if the assembler requires that we use<br>
> /// \code<br>
> @@ -442,7 +446,9 @@ public:<br>
> bool getAlignmentIsInBytes() const { return AlignmentIsInBytes; }<br>
> unsigned getTextAlignFillValue() const { return TextAlignFillValue; }<br>
> const char *getGlobalDirective() const { return GlobalDirective; }<br>
> - bool hasSetDirective() const { return HasSetDirective; }<br>
> + bool doesSetDirectiveSuppressesReloc() const {<br>
> + return SetDirectiveSuppressesReloc;<br>
> + }<br>
> bool hasAggressiveSymbolFolding() const { return HasAggressiveSymbolFolding; }<br>
> bool getCOMMDirectiveAlignmentIsInBytes() const {<br>
> return COMMDirectiveAlignmentIsInBytes;<br>
><br>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=220256&r1=220255&r2=220256&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=220256&r1=220255&r2=220256&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)<br>
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon Oct 20 20:17:30 2014<br>
> @@ -962,24 +962,21 @@ bool AsmPrinter::doFinalization(Module &<br>
> }<br>
> }<br>
><br>
> - if (MAI->hasSetDirective()) {<br>
> - OutStreamer.AddBlankLine();<br>
> - for (const auto &Alias : M.aliases()) {<br>
> - MCSymbol *Name = getSymbol(&Alias);<br>
> -<br>
> - if (Alias.hasExternalLinkage() || !MAI->getWeakRefDirective())<br>
> - OutStreamer.EmitSymbolAttribute(Name, MCSA_Global);<br>
> - else if (Alias.hasWeakLinkage() || Alias.hasLinkOnceLinkage())<br>
> - OutStreamer.EmitSymbolAttribute(Name, MCSA_WeakReference);<br>
> - else<br>
> - assert(Alias.hasLocalLinkage() && "Invalid alias linkage");<br>
> + OutStreamer.AddBlankLine();<br>
> + for (const auto &Alias : M.aliases()) {<br>
> + MCSymbol *Name = getSymbol(&Alias);<br>
> +<br>
> + if (Alias.hasExternalLinkage() || !MAI->getWeakRefDirective())<br>
> + OutStreamer.EmitSymbolAttribute(Name, MCSA_Global);<br>
> + else if (Alias.hasWeakLinkage() || Alias.hasLinkOnceLinkage())<br>
> + OutStreamer.EmitSymbolAttribute(Name, MCSA_WeakReference);<br>
> + else<br>
> + assert(Alias.hasLocalLinkage() && "Invalid alias linkage");<br>
><br>
> - EmitVisibility(Name, Alias.getVisibility());<br>
> + EmitVisibility(Name, Alias.getVisibility());<br>
><br>
> - // Emit the directives as assignments aka .set:<br>
> - OutStreamer.EmitAssignment(Name,<br>
> - lowerConstant(Alias.getAliasee(), *this));<br>
> - }<br>
> + // Emit the directives as assignments aka .set:<br>
> + OutStreamer.EmitAssignment(Name, lowerConstant(Alias.getAliasee(), *this));<br>
> }<br>
><br>
> GCModuleInfo *MI = getAnalysisIfAvailable<GCModuleInfo>();<br>
> @@ -1163,11 +1160,10 @@ void AsmPrinter::EmitJumpTableInfo() {<br>
> // If this jump table was deleted, ignore it.<br>
> if (JTBBs.empty()) continue;<br>
><br>
> - // For the EK_LabelDifference32 entry, if the target supports .set, emit a<br>
> - // .set directive for each unique entry. This reduces the number of<br>
> - // relocations the assembler will generate for the jump table.<br>
> + // For the EK_LabelDifference32 entry, if using .set avoids a relocation,<br>
> + /// emit a .set directive for each unique entry.<br>
> if (MJTI->getEntryKind() == MachineJumpTableInfo::EK_LabelDifference32 &&<br>
> - MAI->hasSetDirective()) {<br>
> + MAI->doesSetDirectiveSuppressesReloc()) {<br>
> SmallPtrSet<const MachineBasicBlock*, 16> EmittedSets;<br>
> const TargetLowering *TLI = TM.getSubtargetImpl()->getTargetLowering();<br>
> const MCExpr *Base = TLI->getPICJumpTableRelocBaseExpr(MF,JTI,OutContext);<br>
> @@ -1240,24 +1236,18 @@ void AsmPrinter::EmitJumpTableEntry(cons<br>
> }<br>
><br>
> case MachineJumpTableInfo::EK_LabelDifference32: {<br>
> - // EK_LabelDifference32 - Each entry is the address of the block minus<br>
> - // the address of the jump table. This is used for PIC jump tables where<br>
> - // gprel32 is not supported. e.g.:<br>
> + // Each entry is the address of the block minus the address of the jump<br>
> + // table. This is used for PIC jump tables where gprel32 is not supported.<br>
> + // e.g.:<br>
> // .word LBB123 - LJTI1_2<br>
> - // If the .set directive is supported, this is emitted as:<br>
> + // If the .set directive avoids relocations, this is emitted as:<br>
> // .set L4_5_set_123, LBB123 - LJTI1_2<br>
> // .word L4_5_set_123<br>
> -<br>
> - // If we have emitted set directives for the jump table entries, print<br>
> - // them rather than the entries themselves. If we're emitting PIC, then<br>
> - // emit the table entries as differences between two text section labels.<br>
> - if (MAI->hasSetDirective()) {<br>
> - // If we used .set, reference the .set's symbol.<br>
> + if (MAI->doesSetDirectiveSuppressesReloc()) {<br>
> Value = MCSymbolRefExpr::Create(GetJTSetSymbol(UID, MBB->getNumber()),<br>
> OutContext);<br>
> break;<br>
> }<br>
> - // Otherwise, use the difference as the jump table entry.<br>
> Value = MCSymbolRefExpr::Create(MBB->getSymbol(), OutContext);<br>
> const MCExpr *JTI = MCSymbolRefExpr::Create(GetJTISymbol(UID), OutContext);<br>
> Value = MCBinaryExpr::CreateSub(Value, JTI, OutContext);<br>
> @@ -1441,9 +1431,9 @@ void AsmPrinter::EmitInt32(int Value) co<br>
> OutStreamer.EmitIntValue(Value, 4);<br>
> }<br>
><br>
> -/// EmitLabelDifference - Emit something like ".long Hi-Lo" where the size<br>
> -/// in bytes of the directive is specified by Size and Hi/Lo specify the<br>
> -/// labels. This implicitly uses .set if it is available.<br>
> +/// Emit something like ".long Hi-Lo" where the size in bytes of the directive<br>
> +/// is specified by Size and Hi/Lo specify the labels. This implicitly uses<br>
> +/// .set if it avoids relocations.<br>
> void AsmPrinter::EmitLabelDifference(const MCSymbol *Hi, const MCSymbol *Lo,<br>
> unsigned Size) const {<br>
> // Get the Hi-Lo expression.<br>
> @@ -1452,7 +1442,7 @@ void AsmPrinter::EmitLabelDifference(con<br>
> MCSymbolRefExpr::Create(Lo, OutContext),<br>
> OutContext);<br>
><br>
> - if (!MAI->hasSetDirective()) {<br>
> + if (!MAI->doesSetDirectiveSuppressesReloc()) {<br>
> OutStreamer.EmitValue(Diff, Size);<br>
> return;<br>
> }<br>
><br>
> Modified: llvm/trunk/lib/MC/MCAsmInfo.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfo.cpp?rev=220256&r1=220255&r2=220256&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfo.cpp?rev=220256&r1=220255&r2=220256&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/MC/MCAsmInfo.cpp (original)<br>
> +++ llvm/trunk/lib/MC/MCAsmInfo.cpp Mon Oct 20 20:17:30 2014<br>
> @@ -64,7 +64,7 @@ MCAsmInfo::MCAsmInfo() {<br>
> GPRel64Directive = nullptr;<br>
> GPRel32Directive = nullptr;<br>
> GlobalDirective = "\t.globl\t";<br>
> - HasSetDirective = true;<br>
> + SetDirectiveSuppressesReloc = false;<br>
> HasAggressiveSymbolFolding = true;<br>
> COMMDirectiveAlignmentIsInBytes = true;<br>
> LCOMMDirectiveAlignmentType = LCOMM::NoAlignment;<br>
><br>
> Modified: llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp?rev=220256&r1=220255&r2=220256&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp?rev=220256&r1=220255&r2=220256&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp (original)<br>
> +++ llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp Mon Oct 20 20:17:30 2014<br>
> @@ -60,4 +60,5 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() {<br>
> DwarfUsesRelocationsAcrossSections = false;<br>
><br>
> UseIntegratedAssembler = true;<br>
> + SetDirectiveSuppressesReloc = true;<br>
> }<br>
><br>
> Modified: llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp?rev=220256&r1=220255&r2=220256&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp?rev=220256&r1=220255&r2=220256&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp (original)<br>
> +++ llvm/trunk/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp Mon Oct 20 20:17:30 2014<br>
> @@ -33,8 +33,6 @@ NVPTXMCAsmInfo::NVPTXMCAsmInfo(StringRef<br>
><br>
> CommentString = "//";<br>
><br>
> - HasSetDirective = false;<br>
> -<br>
> HasSingleParameterDotFile = false;<br>
><br>
> InlineAsmStart = " inline asm";<br>
><br>
> Modified: llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp?rev=220256&r1=220255&r2=220256&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp?rev=220256&r1=220255&r2=220256&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp (original)<br>
> +++ llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp Mon Oct 20 20:17:30 2014<br>
> @@ -35,7 +35,6 @@ AMDGPUMCAsmInfo::AMDGPUMCAsmInfo(StringR<br>
><br>
> //===--- Global Variable Emission Directives --------------------------===//<br>
> GlobalDirective = ".global";<br>
> - HasSetDirective = false;<br>
> HasAggressiveSymbolFolding = true;<br>
> COMMDirectiveAlignmentIsInBytes = false;<br>
> HasDotTypeDotSizeDirective = false;<br>
><br>
> Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=220256&r1=220255&r2=220256&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=220256&r1=220255&r2=220256&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Target/X86/X86MCInstLower.cpp (original)<br>
> +++ llvm/trunk/lib/Target/X86/X86MCInstLower.cpp Mon Oct 20 20:17:30 2014<br>
> @@ -264,7 +264,8 @@ MCOperand X86MCInstLower::LowerSymbolOpe<br>
> Expr = MCBinaryExpr::CreateSub(Expr,<br>
> MCSymbolRefExpr::Create(MF.getPICBaseSymbol(), Ctx),<br>
> Ctx);<br>
> - if (MO.isJTI() && MAI.hasSetDirective()) {<br>
> + if (MO.isJTI()) {<br>
> + assert(MAI.doesSetDirectiveSuppressesReloc());<br>
> // If .set directive is supported, use it to reduce the number of<br>
> // relocations the assembler will generate for differences between<br>
> // local labels. This is only safe when the symbols are in the same<br>
><br>
> Modified: llvm/trunk/test/CodeGen/AArch64/jump-table.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/jump-table.ll?rev=220256&r1=220255&r2=220256&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/jump-table.ll?rev=220256&r1=220255&r2=220256&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/CodeGen/AArch64/jump-table.ll (original)<br>
> +++ llvm/trunk/test/CodeGen/AArch64/jump-table.ll Mon Oct 20 20:17:30 2014<br>
> @@ -56,15 +56,11 @@ lbl4:<br>
> ; CHECK-NEXT: .xword<br>
><br>
> ; CHECK-PIC-NOT: .data_region<br>
> -; CHECK-PIC: .L[[VAR1:.*]] = .LBB{{.*}}-.LJTI0_0<br>
> -; CHECK-PIC-NEXT: .L[[VAR2:.*]] = .LBB{{.*}}-.LJTI0_0<br>
> -; CHECK-PIC-NEXT: .L[[VAR3:.*]] = .LBB{{.*}}-.LJTI0_0<br>
> -; CHECK-PIC-NEXT: .L[[VAR4:.*]] = .LBB{{.*}}-.LJTI0_0<br>
> -; CHECK-PIC-NEXT: .L[[VAR5:.*]] = .LBB{{.*}}-.LJTI0_0<br>
> -; CHECK-PIC-NEXT: .LJTI0_0:<br>
> -; CHECK-PIC-NEXT: .word .L[[VAR1]]<br>
> -; CHECK-PIC-NEXT: .word .L[[VAR2]]<br>
> -; CHECK-PIC-NEXT: .word .L[[VAR3]]<br>
> -; CHECK-PIC-NEXT: .word .L[[VAR4]]<br>
> -; CHECK-PIC-NEXT: .word .L[[VAR5]]<br>
> +; CHECK-PIC-NOT: .LJTI0_0<br>
> +; CHECK-PIC: .LJTI0_0:<br>
> +; CHECK-PIC-NEXT: .word .LBB{{.*}}-.LJTI0_0<br>
> +; CHECK-PIC-NEXT: .word .LBB{{.*}}-.LJTI0_0<br>
> +; CHECK-PIC-NEXT: .word .LBB{{.*}}-.LJTI0_0<br>
> +; CHECK-PIC-NEXT: .word .LBB{{.*}}-.LJTI0_0<br>
> +; CHECK-PIC-NEXT: .word .LBB{{.*}}-.LJTI0_0<br>
> ; CHECK-PIC-NOT: .end_data_region<br>
><br>
> Modified: llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll?rev=220256&r1=220255&r2=220256&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll?rev=220256&r1=220255&r2=220256&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll (original)<br>
> +++ llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll Mon Oct 20 20:17:30 2014<br>
> @@ -2,8 +2,7 @@<br>
> ; RUN: llc -mtriple=x86_64-pc-linux -O2 -regalloc=basic < %s | FileCheck %s<br>
> ; Test to check .debug_loc support. This test case emits many debug_loc entries.<br>
><br>
> -; CHECK: Loc expr size<br>
> -; CHECK-NEXT: .short<br>
> +; CHECK: .short {{.*}} # Loc expr size<br>
> ; CHECK-NEXT: .Ltmp<br>
> ; CHECK-NEXT: DW_OP_reg<br>
><br>
><br>
> Modified: llvm/trunk/test/CodeGen/X86/patchpoint-invoke.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/patchpoint-invoke.ll?rev=220256&r1=220255&r2=220256&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/patchpoint-invoke.ll?rev=220256&r1=220255&r2=220256&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/CodeGen/X86/patchpoint-invoke.ll (original)<br>
> +++ llvm/trunk/test/CodeGen/X86/patchpoint-invoke.ll Mon Oct 20 20:17:30 2014<br>
> @@ -38,10 +38,8 @@ threw:<br>
> ; CHECK-NEXT: .byte 3<br>
> ; CHECK-NEXT: .byte 13<br>
> ; Verify that the unwind data covers the entire patchpoint region:<br>
> -; CHECK-NEXT: [[RANGE_OFFSET:.L[^ ]*]] = .Ltmp0-[[FUNC_BEGIN]]<br>
> -; CHECK-NEXT: .long [[RANGE_OFFSET]]<br>
> -; CHECK-NEXT: [[RANGE_LENGTH:.L[^ ]*]] = [[PP_END]]-.Ltmp0<br>
> -; CHECK-NEXT: .long [[RANGE_LENGTH]]<br>
> +; CHECK-NEXT: .long .Ltmp0-[[FUNC_BEGIN]]<br>
> +; CHECK-NEXT: .long [[PP_END]]-.Ltmp0<br>
><br>
><br>
> ; Verify that the stackmap section got emitted:<br>
><br>
> Modified: llvm/trunk/test/CodeGen/XCore/exception.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/exception.ll?rev=220256&r1=220255&r2=220256&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/exception.ll?rev=220256&r1=220255&r2=220256&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/CodeGen/XCore/exception.ll (original)<br>
> +++ llvm/trunk/test/CodeGen/XCore/exception.ll Mon Oct 20 20:17:30 2014<br>
> @@ -107,17 +107,12 @@ Exit:<br>
> ; CHECK: .asciiz<br>
> ; CHECK: .byte 3<br>
> ; CHECK: .byte 26<br>
> -; CHECK: [[SET0:.L[a-zA-Z0-9_]+]] = [[PRE_G]]-[[START]]<br>
> -; CHECK: .long [[SET0]]<br>
> -; CHECK: [[SET1:.L[a-zA-Z0-9_]+]] = [[POST_G]]-[[PRE_G]]<br>
> -; CHECK: .long [[SET1]]<br>
> -; CHECK: [[SET2:.L[a-zA-Z0-9_]+]] = [[LANDING]]-[[START]]<br>
> -; CHECK: .long [[SET2]]<br>
> +; CHECK: .long [[PRE_G]]-[[START]]<br>
> +; CHECK: .long [[POST_G]]-[[PRE_G]]<br>
> +; CHECK: .long [[LANDING]]-[[START]]<br>
> ; CHECK: .byte 3<br>
> -; CHECK: [[SET3:.L[a-zA-Z0-9_]+]] = [[POST_G]]-[[START]]<br>
> -; CHECK: .long [[SET3]]<br>
> -; CHECK: [[SET4:.L[a-zA-Z0-9_]+]] = [[END]]-[[POST_G]]<br>
> -; CHECK: .long [[SET4]]<br>
> +; CHECK: .long [[POST_G]]-[[START]]<br>
> +; CHECK: .long [[END]]-[[POST_G]]<br>
> ; CHECK: .long 0<br>
> ; CHECK: .byte 0<br>
> ; CHECK: .byte 1<br>
><br>
> Modified: llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll?rev=220256&r1=220255&r2=220256&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll?rev=220256&r1=220255&r2=220256&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll (original)<br>
> +++ llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll Mon Oct 20 20:17:30 2014<br>
> @@ -22,17 +22,13 @@<br>
> ; We expect two location ranges for the variable.<br>
><br>
> ; First, it is stored in %rdx:<br>
> -; CHECK: .Lset{{[0-9]+}} = .Lfunc_begin0-.Lfunc_begin0<br>
> -; CHECK-NEXT: .quad .Lset{{[0-9]+}}<br>
> -; CHECK-NEXT: .Lset{{[0-9]+}} = [[START_LABEL]]-.Lfunc_begin0<br>
> -; CHECK-NEXT: .quad .Lset{{[0-9]+}}<br>
> +; CHECK: .quad .Lfunc_begin0-.Lfunc_begin0<br>
> +; CHECK-NEXT: .quad [[START_LABEL]]-.Lfunc_begin0<br>
> ; CHECK: DW_OP_reg5<br>
><br>
> ; Then it's addressed via %rsp:<br>
> -; CHECK: .Lset{{[0-9]+}} = [[START_LABEL]]-.Lfunc_begin0<br>
> -; CHECK-NEXT: .quad .Lset{{[0-9]+}}<br>
> -; CHECK-NEXT: .Lset{{[0-9]+}} = .Lfunc_end0-.Lfunc_begin0<br>
> -; CHECK-NEXT: .quad .Lset{{[0-9]+}}<br>
> +; CHECK: .quad [[START_LABEL]]-.Lfunc_begin0<br>
> +; CHECK-NEXT: .Lfunc_end0-.Lfunc_begin0<br>
> ; CHECK: DW_OP_breg7<br>
> ; CHECK-NEXT: [[OFFSET]]<br>
> ; CHECK: DW_OP_deref<br>
><br>
> Modified: llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll?rev=220256&r1=220255&r2=220256&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll?rev=220256&r1=220255&r2=220256&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll (original)<br>
> +++ llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll Mon Oct 20 20:17:30 2014<br>
> @@ -15,18 +15,15 @@<br>
><br>
> ; <data section> - it should have made one span covering all vars in this CU.<br>
> ; CHECK-NEXT: .quad some_data<br>
> -; CHECK-NEXT: [[R1:\.[A-Za-z0-9]*]] = .Ldebug_end1-some_data<br>
> -; CHECK-NEXT: .quad [[R1]]<br>
> +; CHECK-NEXT: .quad .Ldebug_end1-some_data<br>
><br>
> ; <text section> - it should have made one span covering all functions in this CU.<br>
> ; CHECK-NEXT: .quad .Lfunc_begin0<br>
> -; CHECK-NEXT: [[R2:\.[A-Za-z0-9]*]] = .Ldebug_end2-.Lfunc_begin0<br>
> -; CHECK-NEXT: .quad [[R2]]<br>
> +; CHECK-NEXT: .quad .Ldebug_end2-.Lfunc_begin0<br>
><br>
> ; <other sections> - it should have made one span covering all vars in this CU.<br>
> ; CHECK-NEXT: .quad some_other<br>
> -; CHECK-NEXT: [[R3:\.[A-Za-z0-9]*]] = .Ldebug_end3-some_other<br>
> -; CHECK-NEXT: .quad [[R3]]<br>
> +; CHECK-NEXT: .quad .Ldebug_end3-some_other<br>
><br>
> ; -- finish --<br>
> ; CHECK-NEXT: # ARange terminator<br>
><br>
> Modified: llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll?rev=220256&r1=220255&r2=220256&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll?rev=220256&r1=220255&r2=220256&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll (original)<br>
> +++ llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll Mon Oct 20 20:17:30 2014<br>
> @@ -8,8 +8,7 @@<br>
> ; CHECK-NEXT: .byte 0 # Segment Size (in bytes)<br>
> ; CHECK-NEXT: .zero 4,255<br>
> ; CHECK-NEXT: .quad kittens<br>
> -; CHECK-NEXT: .Lset0 = rainbows-kittens<br>
> -; CHECK-NEXT: .quad .Lset0<br>
> +; CHECK-NEXT: .quad rainbows-kittens<br>
> ; CHECK-NEXT: .quad 0 # ARange terminator<br>
> ; CHECK-NEXT: .quad 0<br>
><br>
> @@ -21,8 +20,7 @@<br>
> ; CHECK-NEXT: .byte 0 # Segment Size (in bytes)<br>
> ; CHECK-NEXT: .zero 4,255<br>
> ; CHECK-NEXT: .quad rainbows<br>
> -; CHECK-NEXT: .Lset1 = .Ldebug_end0-rainbows<br>
> -; CHECK-NEXT: .quad .Lset1<br>
> +; CHECK-NEXT: .quad .Ldebug_end0-rainbows<br>
> ; CHECK-NEXT: .quad 0 # ARange terminator<br>
> ; CHECK-NEXT: .quad 0<br>
><br>
><br>
> Modified: llvm/trunk/test/DebugInfo/X86/pr19307.ll<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/pr19307.ll?rev=220256&r1=220255&r2=220256&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/pr19307.ll?rev=220256&r1=220255&r2=220256&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/DebugInfo/X86/pr19307.ll (original)<br>
> +++ llvm/trunk/test/DebugInfo/X86/pr19307.ll Mon Oct 20 20:17:30 2014<br>
> @@ -20,10 +20,8 @@<br>
> ; Verify that we have proper range in debug_loc section:<br>
> ; CHECK: .Ldebug_loc{{[0-9]+}}:<br>
> ; CHECK: DW_OP_breg1<br>
> -; CHECK: .Lset{{[0-9]+}} = [[START_LABEL]]-.Lfunc_begin0<br>
> -; CHECK-NEXT: .quad .Lset{{[0-9]+}}<br>
> -; CHECK-NEXT: .Lset{{[0-9]+}} = .Lfunc_end0-.Lfunc_begin0<br>
> -; CHECK-NEXT: .quad .Lset{{[0-9]+}}<br>
> +; CHECK: .quad [[START_LABEL]]-.Lfunc_begin0<br>
> +; CHECK-NEXT: .quad .Lfunc_end0-.Lfunc_begin0<br>
> ; CHECK: DW_OP_breg6<br>
> ; CHECK: DW_OP_deref<br>
><br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</p>