[llvm-commits] [llvm] r100636 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/X86/crash.ll
Chris Lattner
sabre at nondot.org
Wed Apr 7 11:03:19 PDT 2010
Author: lattner
Date: Wed Apr 7 13:03:19 2010
New Revision: 100636
URL: http://llvm.org/viewvc/llvm-project?rev=100636&view=rev
Log:
fix a latent bug my inline asm stuff exposed:
MachineOperand::isIdenticalTo wasn't handling metadata operands.
Modified:
llvm/trunk/lib/CodeGen/MachineInstr.cpp
llvm/trunk/test/CodeGen/X86/crash.ll
Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=100636&r1=100635&r2=100636&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Wed Apr 7 13:03:19 2010
@@ -192,6 +192,8 @@
return getBlockAddress() == Other.getBlockAddress();
case MachineOperand::MO_MCSymbol:
return getMCSymbol() == Other.getMCSymbol();
+ case MachineOperand::MO_Metadata:
+ return getMetadata() == Other.getMetadata();
}
}
Modified: llvm/trunk/test/CodeGen/X86/crash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/crash.ll?rev=100636&r1=100635&r2=100636&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/crash.ll (original)
+++ llvm/trunk/test/CodeGen/X86/crash.ll Wed Apr 7 13:03:19 2010
@@ -92,3 +92,19 @@
}
+; Crash commoning identical asms.
+define void @test6(i1 %C) nounwind optsize ssp {
+entry:
+ br i1 %C, label %do.body55, label %do.body92
+
+do.body55: ; preds = %if.else36
+ call void asm sideeffect "foo", "~{dirflag},~{fpsr},~{flags}"() nounwind, !srcloc !0
+ ret void
+
+do.body92: ; preds = %if.then66
+ call void asm sideeffect "foo", "~{dirflag},~{fpsr},~{flags}"() nounwind, !srcloc !1
+ ret void
+}
+
+!0 = metadata !{i32 633550}
+!1 = metadata !{i32 634261}
More information about the llvm-commits
mailing list