diff options
| author | Manuel Drehwald <git@manuel.drehwald.info> | 2025-06-16 14:23:06 -0700 |
|---|---|---|
| committer | Manuel Drehwald <git@manuel.drehwald.info> | 2025-06-16 14:23:06 -0700 |
| commit | 6359123d25e8ff38c6fbf280559d5f829bec691f (patch) | |
| tree | 887d5247e61d141314d8c116407f4a05ea69c912 /compiler/rustc_codegen_llvm/src/builder | |
| parent | 7d3a1d49ab6bba49eae6536c77fc52152c9e3768 (diff) | |
| download | rust-6359123d25e8ff38c6fbf280559d5f829bec691f.tar.gz rust-6359123d25e8ff38c6fbf280559d5f829bec691f.zip | |
add and use generic get_const_int function
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/builder/autodiff.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder/autodiff.rs b/compiler/rustc_codegen_llvm/src/builder/autodiff.rs index c5c13ac097a..b07d9a5cfca 100644 --- a/compiler/rustc_codegen_llvm/src/builder/autodiff.rs +++ b/compiler/rustc_codegen_llvm/src/builder/autodiff.rs @@ -114,7 +114,7 @@ fn match_args_from_caller_to_enzyme<'ll>( let mul = unsafe { llvm::LLVMBuildMul( builder.llbuilder, - cx.get_const_i64(elem_bytes_size), + cx.get_const_int(cx.type_i64(), elem_bytes_size), next_outer_arg, UNNAMED, ) @@ -385,7 +385,7 @@ fn generate_enzyme_call<'ll>( if attrs.width > 1 { let enzyme_width = cx.create_metadata("enzyme_width".to_string()).unwrap(); args.push(cx.get_metadata_value(enzyme_width)); - args.push(cx.get_const_i64(attrs.width as u64)); + args.push(cx.get_const_int(cx.type_i64(), attrs.width as u64)); } let has_sret = has_sret(outer_fn); |
