Hans Wennborg | acb842d | 2014-03-05 02:43:26 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -force-align-stack -mtriple i386-apple-darwin -mcpu=i486 | FileCheck %s |
| 2 | |
| 3 | %struct.foo = type { [88 x i8] } |
| 4 | |
| 5 | declare void @bar(i8* nocapture, %struct.foo* align 4 byval) nounwind |
| 6 | |
| 7 | ; PR19012 |
| 8 | ; Don't clobber %esi if we have inline asm that clobbers %esp. |
| 9 | define void @test1(%struct.foo* nocapture %x, i32 %y, i8* %z) nounwind { |
| 10 | call void @bar(i8* %z, %struct.foo* align 4 byval %x) |
| 11 | call void asm sideeffect inteldialect "xor esp, esp", "=*m,~{flags},~{esp},~{esp},~{dirflag},~{fpsr},~{flags}"(i8* %z) |
| 12 | ret void |
| 13 | |
| 14 | ; CHECK-LABEL: test1: |
| 15 | ; CHECK: movl %esp, %esi |
Hans Wennborg | d683a22 | 2014-03-26 16:30:54 +0000 | [diff] [blame] | 16 | ; CHECK-NOT: rep;movsl |
Hans Wennborg | acb842d | 2014-03-05 02:43:26 +0000 | [diff] [blame] | 17 | } |