Skip to content

Commit a3eb806

Browse files
Fix for #101613
Changes X86InstrInfo.cpp updated with check to ignore inlineasm pr59305.ll Test case fix
1 parent 12937b1 commit a3eb806

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

llvm/lib/Target/X86/X86InsertWait.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,9 @@ bool WaitInsert::runOnMachineFunction(MachineFunction &MF) {
103103

104104
for (MachineBasicBlock &MBB : MF) {
105105
for (MachineBasicBlock::iterator MI = MBB.begin(); MI != MBB.end(); ++MI) {
106-
// Jump non X87 instruction.
107-
if (!X86::isX87Instruction(*MI))
106+
107+
// Jump non X87 instruction and Inline asm.
108+
if (!X86::isX87Instruction(*MI) || MI->isInlineAsm())
108109
continue;
109110
// If the instruction instruction neither has float exception nor is
110111
// a load/store instruction, or the instruction is x87 control

llvm/test/CodeGen/X86/pr59305.ll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,17 @@ define double @bar(double %0) #0 {
8181
; X64-NEXT: #APP
8282
; X64-NEXT: ldmxcsr 0
8383
; X64-NEXT: #NO_APP
84-
; X64-NEXT: wait
8584
; X64-NEXT: movsd {{.*#+}} xmm2 = [1.0E+0,0.0E+0]
8685
; X64-NEXT: movapd %xmm2, %xmm3
8786
; X64-NEXT: divsd %xmm0, %xmm3
8887
; X64-NEXT: #APP
8988
; X64-NEXT: ldmxcsr 0
9089
; X64-NEXT: #NO_APP
91-
; X64-NEXT: wait
9290
; X64-NEXT: movapd %xmm2, %xmm1
9391
; X64-NEXT: divsd %xmm0, %xmm1
9492
; X64-NEXT: #APP
9593
; X64-NEXT: ldmxcsr 0
9694
; X64-NEXT: #NO_APP
97-
; X64-NEXT: wait
9895
; X64-NEXT: divsd %xmm0, %xmm2
9996
; X64-NEXT: movapd %xmm3, %xmm0
10097
; X64-NEXT: callq fma@PLT

0 commit comments

Comments
 (0)