Duncan Sands | dabc280 | 2011-09-05 06:52:48 +0000 | [diff] [blame^] | 1 | ; RUN: opt < %s -instsimplify -S | FileCheck %s |
| 2 | |
| 3 | ; CHECK-NOT: extractvalue |
| 4 | ; CHECK-NOT: insertvalue |
| 5 | |
| 6 | declare void @bar() |
| 7 | |
| 8 | define void @foo() { |
| 9 | entry: |
| 10 | invoke void @bar() to label %cont unwind label %lpad |
| 11 | cont: |
| 12 | ret void |
| 13 | lpad: |
| 14 | %ex = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 cleanup |
| 15 | %exc_ptr = extractvalue { i8*, i32 } %ex, 0 |
| 16 | %filter = extractvalue { i8*, i32 } %ex, 1 |
| 17 | %exc_ptr2 = insertvalue { i8*, i32 } undef, i8* %exc_ptr, 0 |
| 18 | %filter2 = insertvalue { i8*, i32 } %exc_ptr2, i32 %filter, 1 |
| 19 | resume { i8*, i32 } %filter2 |
| 20 | } |
| 21 | |
| 22 | declare i32 @__gxx_personality_v0(i32, i64, i8*, i8*) |