diff options
| author | Amara Emerson <aemerson@apple.com> | 2018-07-26 01:25:58 +0000 |
|---|---|---|
| committer | Amara Emerson <aemerson@apple.com> | 2018-07-26 01:25:58 +0000 |
| commit | fdd089aa14d90fcf220d54fb3fbfd2170f89de78 (patch) | |
| tree | 525d7c3ef2cf65af43b4fb1bb1fa616638bc8cc2 /llvm/test/CodeGen | |
| parent | 1d56b4ae40c6dc7bbf6ec6917c986ae5210d1b70 (diff) | |
| download | bcm5719-llvm-fdd089aa14d90fcf220d54fb3fbfd2170f89de78.tar.gz bcm5719-llvm-fdd089aa14d90fcf220d54fb3fbfd2170f89de78.zip | |
[GlobalISel] Fall back to SDISel for swifterror/swiftself attributes.
We don't currently support these, fall back until we do.
llvm-svn: 337994
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll b/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll index e0c88609fed..9c9d22d8ff6 100644 --- a/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll +++ b/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll @@ -235,3 +235,26 @@ define void @nonpow2_vector_add_fewerelements() { store i64 %ex, i64* undef ret void } + +%swift_error = type {i64, i8} + +; FALLBACK-WITH-REPORT-ERR: remark: <unknown>:0:0: unable to lower arguments due to swifterror/swiftself: void (%swift_error**)* (in function: swifterror_param) +; FALLBACK-WITH-REPORT-ERR: warning: Instruction selection used fallback path for swifterror_param +define void @swifterror_param(%swift_error** swifterror %error_ptr_ref) { + ret void +} + +; FALLBACK-WITH-REPORT-ERR: remark: <unknown>:0:0: unable to translate instruction: alloca: ' %error_ptr_ref = alloca swifterror %swift_error*' (in function: swifterror_alloca) +; FALLBACK-WITH-REPORT-ERR: warning: Instruction selection used fallback path for swifterror_alloca +; We can't currently test the call parameters being swifterror because the value +; must come from a swifterror alloca or parameter, at which point we already +; fallback. As long as those cases work however we should be fine. +define void @swifterror_alloca(i8* %error_ref) { +entry: + %error_ptr_ref = alloca swifterror %swift_error* + store %swift_error* null, %swift_error** %error_ptr_ref + call void @swifterror_param(%swift_error** swifterror %error_ptr_ref) + ret void +} + + |

