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 3 ; 4 ; Ensures that landingpad instructions in x32 use the right Exception Pointer 5 ; and Exception Selector registers. 6 7 declare void @foo() 8 declare void @bar(i8*, i32) noreturn 9 declare i32 @__gxx_personality_v0(...) 10 11 define void @test1() uwtable personality i32 (...)* @__gxx_personality_v0 { 12 entry: 13 invoke void @foo() to label %done unwind label %lpad 14 done: 15 ret void 16 lpad: 17 %0 = landingpad { i8*, 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, {{.*}} 22 ; CHECK: callq bar 23 %1 = extractvalue { i8*, i32 } %0, 0 24 %2 = extractvalue { i8*, i32 } %0, 1 25 call void @bar(i8* %1, i32 %2) 26 unreachable 27 } 28