[llvm] [ARM] CMSE security mitigation on function arguments and returned values (PR #89944)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 03:30:15 PDT 2024


================
@@ -4617,6 +4636,15 @@ SDValue ARMTargetLowering::LowerFormalArguments(
           (VA.getValVT() == MVT::f16 || VA.getValVT() == MVT::bf16))
         ArgValue = MoveToHPR(dl, DAG, VA.getLocVT(), VA.getValVT(), ArgValue);
 
+      // On CMSE Entry Functions, formal integer arguments whose bitwidth is
----------------
ostannard wrote:

Should we also disable the code above here which inserts `ISD::AssertSext` and `ISD::AssertZext`? If we leave them in, it might be possible for optimisations to prove that the newly-added `TRUNCATE`s are pointless and remove them.

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


More information about the llvm-commits mailing list