]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/blob - test/CodeGen/X86/fold-call.ll
[X86][AVX] Added (V)MOVDDUP / (V)MOVSLDUP / (V)MOVSHDUP memory folding + tests.
[opencl/llvm.git] / test / CodeGen / X86 / fold-call.ll
1 ; RUN: llc < %s -march=x86 | FileCheck %s
2 ; RUN: llc < %s -march=x86-64 | FileCheck %s
4 ; CHECK: test1
5 ; CHECK-NOT: mov
7 declare void @bar()
8 define void @test1(i32 %i0, i32 %i1, i32 %i2, i32 %i3, i32 %i4, i32 %i5, void()* %arg) nounwind {
9         call void @bar()
10         call void %arg()
11         ret void
12 }
14 ; PR14739
15 ; CHECK: test2
16 ; CHECK: mov{{.*}} $0, ([[REGISTER:%[a-z]+]])
17 ; CHECK-NOT: jmp{{.*}} *([[REGISTER]])
19 %struct.X = type { void ()* }
20 define void @test2(%struct.X* nocapture %x) {
21 entry:
22   %f = getelementptr inbounds %struct.X* %x, i64 0, i32 0
23   %0 = load void ()** %f
24   store void ()* null, void ()** %f
25   tail call void %0()
26   ret void
27 }