[llvm] [CodeGen] Generalize trap emission after SP check fail (PR #109744)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 04:23:55 PDT 2024


================
@@ -3807,16 +3807,11 @@ bool IRTranslator::emitSPDescriptorFailure(StackProtectorDescriptor &SPD,
     return false;
   }
 
-  // On PS4/PS5, the "return address" must still be within the calling
-  // function, even if it's at the very end, so emit an explicit TRAP here.
-  // WebAssembly needs an unreachable instruction after a non-returning call,
-  // because the function return type can be different from __stack_chk_fail's
-  // return type (void).
-  const TargetMachine &TM = MF->getTarget();
-  if (TM.getTargetTriple().isPS() || TM.getTargetTriple().isWasm()) {
----------------
duk-37 wrote:

There are existing tests for these targets

https://github.com/llvm/llvm-project/pull/109744


More information about the llvm-commits mailing list