brintos

brintos / llvm-project-archived public Read only

0
0
Text · 873 B · 524a262 Raw
28 lines · plain
1; RUN: llc < %s -mtriple=x86_64-none-none-gnux32 -mcpu=generic | FileCheck %s2; RUN: llc < %s -mtriple=x86_64-none-none-gnux32 -mcpu=generic -fast-isel | FileCheck %s3;4; Ensures that landingpad instructions in x32 use the right Exception Pointer5; and Exception Selector registers.6 7declare void @foo()8declare void @bar(ptr, i32) noreturn9declare i32 @__gxx_personality_v0(...)10 11define void @test1() uwtable personality ptr @__gxx_personality_v0 {12entry:13  invoke void @foo() to label %done unwind label %lpad14done:15  ret void16lpad:17  %0 = landingpad { ptr, i32 } cleanup18; The Exception Pointer is %eax; the Exception Selector, %edx.19; CHECK: LBB{{[^%]*}} %lpad20; CHECK-DAG: movl %eax, {{.*}}21; CHECK-DAG: movl %edx, {{.*}}22; CHECK: callq bar23  %1 = extractvalue { ptr, i32 } %0, 024  %2 = extractvalue { ptr, i32 } %0, 125  call void @bar(ptr %1, i32 %2)26  unreachable27}28