diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 |
| commit | 01095a5d43bbfde13731688ddcf6048ebb8b7721 (patch) | |
| tree | 4def12e759965de927d963ac65840d663ef9d1ea /test/Transforms/ArgumentPromotion | |
| parent | f0f4822ed4b66e3579e92a89f368f8fb860e218e (diff) | |
Notes
Diffstat (limited to 'test/Transforms/ArgumentPromotion')
| -rw-r--r-- | test/Transforms/ArgumentPromotion/dbg.ll | 5 | ||||
| -rw-r--r-- | test/Transforms/ArgumentPromotion/inalloca.ll | 4 | ||||
| -rw-r--r-- | test/Transforms/ArgumentPromotion/pr27568.ll | 31 |
3 files changed, 35 insertions, 5 deletions
diff --git a/test/Transforms/ArgumentPromotion/dbg.ll b/test/Transforms/ArgumentPromotion/dbg.ll index dbdccacf42ba..3d353db105fd 100644 --- a/test/Transforms/ArgumentPromotion/dbg.ll +++ b/test/Transforms/ArgumentPromotion/dbg.ll @@ -23,7 +23,6 @@ define void @caller(i32** %Y) { !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = !DILocation(line: 8, scope: !2) -!2 = distinct !DISubprogram(name: "test", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, scope: null) -!3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: 2, file: !5, subprograms: !4) -!4 = !{!2} +!2 = distinct !DISubprogram(name: "test", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !3, scopeLine: 3, scope: null) +!3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !5) !5 = !DIFile(filename: "test.c", directory: "") diff --git a/test/Transforms/ArgumentPromotion/inalloca.ll b/test/Transforms/ArgumentPromotion/inalloca.ll index 80bd6fdbc406..5bf57c8ff465 100644 --- a/test/Transforms/ArgumentPromotion/inalloca.ll +++ b/test/Transforms/ArgumentPromotion/inalloca.ll @@ -1,10 +1,10 @@ -; RUN: opt %s -argpromotion -scalarrepl -S | FileCheck %s +; RUN: opt %s -argpromotion -sroa -S | FileCheck %s target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" %struct.ss = type { i32, i32 } -; Argpromote + scalarrepl should change this to passing the two integers by value. +; Argpromote + sroa should change this to passing the two integers by value. define internal i32 @f(%struct.ss* inalloca %s) { entry: %f0 = getelementptr %struct.ss, %struct.ss* %s, i32 0, i32 0 diff --git a/test/Transforms/ArgumentPromotion/pr27568.ll b/test/Transforms/ArgumentPromotion/pr27568.ll new file mode 100644 index 000000000000..648317aee0da --- /dev/null +++ b/test/Transforms/ArgumentPromotion/pr27568.ll @@ -0,0 +1,31 @@ +; RUN: opt -S -argpromotion < %s | FileCheck %s +target triple = "x86_64-pc-windows-msvc" + +define internal void @callee(i8*) { +entry: + call void @thunk() + ret void +} + +define void @test1() personality i32 (...)* @__CxxFrameHandler3 { +entry: + invoke void @thunk() + to label %out unwind label %cpad + +out: + ret void + +cpad: + %pad = cleanuppad within none [] + call void @callee(i8* null) [ "funclet"(token %pad) ] + cleanupret from %pad unwind to caller +} + +; CHECK-LABEL: define void @test1( +; CHECK: %[[pad:.*]] = cleanuppad within none [] +; CHECK-NEXT: call void @callee() [ "funclet"(token %[[pad]]) ] +; CHECK-NEXT: cleanupret from %[[pad]] unwind to caller + +declare void @thunk() + +declare i32 @__CxxFrameHandler3(...) |
