diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2025-02-05 03:43:54 -0800 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2025-02-13 21:26:48 -0800 |
| commit | 9ad6839f7a64d7a5aa8799661d6974a9d7938646 (patch) | |
| tree | e37192a4fb7bcf72a6488a8133904757d320db16 /compiler/rustc_codegen_llvm/src/llvm | |
| parent | a567209daab72b7ea59eac533278064396bb0534 (diff) | |
Set both `nuw` and `nsw` in slice size calculation
There's an old note in the code to do this, and now that LLVM-C has an API for it, we might as well.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index 618fdb09d4d..3b0187b9d37 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -1430,6 +1430,8 @@ unsafe extern "C" { // Extra flags on arithmetic pub(crate) fn LLVMSetIsDisjoint(Instr: &Value, IsDisjoint: Bool); + pub(crate) fn LLVMSetNUW(ArithInst: &Value, HasNUW: Bool); + pub(crate) fn LLVMSetNSW(ArithInst: &Value, HasNSW: Bool); // Memory pub(crate) fn LLVMBuildAlloca<'a>( |
