From ee114b6cb15049a6be77c70c24c42db23e675e54 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Wed, 2 Oct 2013 08:53:02 -0400 Subject: [PATCH] avoid alloca in with_overflow intrinsics This is pointless, since it's just used to load an `undef` value and never touched again. --- src/librustc/middle/trans/intrinsic.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc/middle/trans/intrinsic.rs b/src/librustc/middle/trans/intrinsic.rs index 6d3b1396fc5..1c1c8a0a370 100644 --- a/src/librustc/middle/trans/intrinsic.rs +++ b/src/librustc/middle/trans/intrinsic.rs @@ -65,7 +65,7 @@ pub fn trans_intrinsic(ccx: @mut CrateContext, let val = Call(bcx, llfn, [a, b], []); let result = ExtractValue(bcx, val, 0); let overflow = ZExt(bcx, ExtractValue(bcx, val, 1), Type::bool()); - let ret = Load(bcx, Alloca(bcx, type_of::type_of(bcx.ccx(), t), "")); + let ret = C_undef(type_of::type_of(bcx.ccx(), t)); let ret = InsertValue(bcx, ret, result, 0); let ret = InsertValue(bcx, ret, overflow, 1);