Skip to content

Commit 27117a1

Browse files
tesujicjgillot
andcommitted
Apply suggestions from code review
Co-authored-by: Camille Gillot <gillot.camille@gmail.com>
1 parent 41484d3 commit 27117a1

File tree

1 file changed

+2
-4
lines changed
  • compiler/rustc_mir_transform/src

1 file changed

+2
-4
lines changed

compiler/rustc_mir_transform/src/gvn.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,7 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
372372
// But to avoid blessing differences between 32-bit and 64-bit target,
373373
// let's choose `size_t = u64`.
374374
const STACK_THRESHOLD: u64 = std::mem::size_of::<u64>() as u64 * 2;
375-
let vvalue = self.get(value);
376-
debug!(?vvalue);
377-
let op = match *vvalue {
375+
let op = match *self.get(value) {
378376
Opaque(_) => return None,
379377
// Do not bother evaluating repeat expressions. This would uselessly consume memory.
380378
Repeat(..) => return None,
@@ -444,7 +442,7 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
444442
})
445443
.ok()?;
446444
let mplace = mplace.unwrap();
447-
return Some(mplace.into());
445+
mplace.into()
448446
} else if matches!(ty.abi, Abi::Scalar(..) | Abi::ScalarPair(..)) {
449447
let dest = self.ecx.allocate(ty, MemoryKind::Stack).ok()?;
450448
let variant_dest = if let Some(variant) = variant {

0 commit comments

Comments
 (0)