diff options
| -rw-r--r-- | clang/lib/CodeGen/CGBuiltin.cpp | 7 | ||||
| -rw-r--r-- | clang/test/CodeGen/ms-setjmp.c | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index c67db26711a..bf53e25b2f9 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -711,11 +711,8 @@ static RValue EmitMSVCRTSetJmp(CodeGenFunction &CGF, MSVCSetJmpKind SJKind, } else { Name = SJKind == MSVCSetJmpKind::_setjmp ? "_setjmp" : "_setjmpex"; Arg1Ty = CGF.Int8PtrTy; - if (CGF.getTarget().getTriple().getArch() == llvm::Triple::aarch64) { - Arg1 = CGF.Builder.CreateCall(CGF.CGM.getIntrinsic(Intrinsic::sponentry)); - } else - Arg1 = CGF.Builder.CreateCall(CGF.CGM.getIntrinsic(Intrinsic::frameaddress), - llvm::ConstantInt::get(CGF.Int32Ty, 0)); + Arg1 = CGF.Builder.CreateCall(CGF.CGM.getIntrinsic(Intrinsic::frameaddress), + llvm::ConstantInt::get(CGF.Int32Ty, 0)); } // Mark the call site and declaration with ReturnsTwice. diff --git a/clang/test/CodeGen/ms-setjmp.c b/clang/test/CodeGen/ms-setjmp.c index a6e30cb96aa..d92f4d00ff5 100644 --- a/clang/test/CodeGen/ms-setjmp.c +++ b/clang/test/CodeGen/ms-setjmp.c @@ -25,7 +25,7 @@ int test_setjmp() { // X64-NEXT: ret i32 %[[call]] // AARCH64-LABEL: define dso_local i32 @test_setjmp - // AARCH64: %[[addr:.*]] = call i8* @llvm.sponentry() + // AARCH64: %[[addr:.*]] = call i8* @llvm.frameaddress(i32 0) // AARCH64: %[[call:.*]] = call i32 @_setjmpex(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i32 0, i32 0), i8* %[[addr]]) // AARCH64-NEXT: ret i32 %[[call]] } @@ -38,7 +38,7 @@ int test_setjmpex() { // X64-NEXT: ret i32 %[[call]] // AARCH64-LABEL: define dso_local i32 @test_setjmpex - // AARCH64: %[[addr:.*]] = call i8* @llvm.sponentry() + // AARCH64: %[[addr:.*]] = call i8* @llvm.frameaddress(i32 0) // AARCH64: %[[call:.*]] = call i32 @_setjmpex(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i32 0, i32 0), i8* %[[addr]]) // AARCH64-NEXT: ret i32 %[[call]] } |

