1 ; RUN: llc < %s -mcpu=atom -mtriple=i686-linux | FileCheck -check-prefix=ATOM32 %s
2 ; RUN: llc < %s -mcpu=core2 -mtriple=i686-linux | FileCheck -check-prefix=ATOM-NOT32 %s
3 ; RUN: llc < %s -mcpu=atom -mtriple=x86_64-linux | FileCheck -check-prefix=ATOM64 %s
4 ; RUN: llc < %s -mcpu=core2 -mtriple=x86_64-linux | FileCheck -check-prefix=ATOM-NOT64 %s
8 %class.A = type { i32 (...)** }
10 define i32 @test1() #0 {
13 %call = tail call %class.A* @_Z3facv()
14 %0 = bitcast %class.A* %call to void (%class.A*)***
15 %vtable = load void (%class.A*)*** %0, align 8
16 %1 = load void (%class.A*)** %vtable, align 8
17 ;ATOM32: movl (%ecx), %ecx
19 ;ATOM-NOT32: calll *(%ecx)
20 ;ATOM64: movq (%rcx), %rcx
22 ;ATOM-NOT64: callq *(%rcx)
23 tail call void %1(%class.A* %call)
27 declare %class.A* @_Z3facv() #1
30 @p = external global void (i32)**
32 define i32 @test2() #0 {
35 %0 = load void (i32)*** @p, align 8
36 %1 = load void (i32)** %0, align 8
37 ;ATOM32: movl (%eax), %eax
39 ;ATOM-NOT: calll *(%eax)
40 ;ATOM64: movq (%rax), %rax
42 ;ATOM-NOT64: callq *(%rax)
43 tail call void %1(i32 2)