diff options
| author | scottmcm <scottmcm@users.noreply.github.com> | 2023-08-04 06:22:50 +0000 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-08-06 15:47:40 -0700 |
| commit | 75277a6606e8c7443ccd3fd1a2562c166fed7298 (patch) | |
| tree | 3d6b79d57e33cff7984a3c3e204442ab51299792 /compiler/rustc_codegen_gcc/src | |
| parent | 502af03445f045dade14f14e754803f02c2c5e24 (diff) | |
| download | rust-75277a6606e8c7443ccd3fd1a2562c166fed7298.tar.gz rust-75277a6606e8c7443ccd3fd1a2562c166fed7298.zip | |
Apply suggestions from code review
Co-authored-by: Ralf Jung <post@ralfj.de>
Diffstat (limited to 'compiler/rustc_codegen_gcc/src')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/intrinsic/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs b/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs index eca2abf2775..f8c32c6dbbb 100644 --- a/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs +++ b/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs @@ -311,6 +311,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { let a_ptr = self.bitcast(a, void_ptr_type); let b_ptr = self.bitcast(b, void_ptr_type); + // Here we assume that the `memcmp` provided by the target is a NOP for size 0. let builtin = self.context.get_builtin_function("memcmp"); let cmp = self.context.new_call(None, builtin, &[a_ptr, b_ptr, n]); self.sext(cmp, self.type_ix(32)) |
