1 ; RUN: llc < %s -mtriple=x86_64-none-none-gnux32 -mcpu=generic | FileCheck %s
2 ; RUN: llc < %s -mtriple=x86_64-none-none-gnux32 -mcpu=generic -fast-isel | FileCheck %s
4 ; Ensures that landingpad instructions in x32 use the right Exception Pointer
5 ; and Exception Selector registers.
8 declare void @bar(ptr, i32) noreturn
9 declare i32 @__gxx_personality_v0(...)
11 define void @test1() uwtable personality ptr @__gxx_personality_v0 {
13 invoke void @foo() to label %done unwind label %lpad
17 %0 = landingpad { ptr, i32 } cleanup
18 ; The Exception Pointer is %eax; the Exception Selector, %edx.
19 ; CHECK: LBB{{[^%]*}} %lpad
20 ; CHECK-DAG: movl %eax, {{.*}}
21 ; CHECK-DAG: movl %edx, {{.*}}
23 %1 = extractvalue { ptr, i32 } %0, 0
24 %2 = extractvalue { ptr, i32 } %0, 1
25 call void @bar(ptr %1, i32 %2)