Skip to content

Commit 4fd8ee5

Browse files
huonwluqmana
authored andcommitted
---
yaml --- r: 139258 b: refs/heads/try2 c: 89a7407 h: refs/heads/master v: v3
1 parent 3644e97 commit 4fd8ee5

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 441313fc0ca635be18d1175e7dc265ab9ffa9d7d
8+
refs/heads/try2: 89a7407c999449c56f9b00145cfbdfbb49fbde7c
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/middle/trans/tvec.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -427,19 +427,17 @@ pub fn write_content(bcx: block,
427427

428428
let loop_counter = {
429429
// i = 0
430-
let i = alloca(loop_bcx, T_i64());
431-
Store(loop_bcx, C_i64(0), i);
430+
let i = alloca(loop_bcx, bcx.ccx().int_type);
431+
Store(loop_bcx, C_uint(bcx.ccx(), 0), i);
432432

433433
Br(loop_bcx, cond_bcx.llbb);
434434
i
435435
};
436436

437437
{ // i < count
438438
let lhs = Load(cond_bcx, loop_counter);
439-
let rhs = C_integral(T_i64(), count as u64, lib::llvm::False);
440-
let cmp_lr = ICmp(cond_bcx, lib::llvm::IntULT, lhs, rhs);
441-
let zext = ZExt(cond_bcx, cmp_lr, T_i8());
442-
let cond_val = ICmp(cond_bcx, lib::llvm::IntNE, zext, C_u8(0));
439+
let rhs = C_uint(bcx.ccx(), count);
440+
let cond_val = ICmp(cond_bcx, lib::llvm::IntULT, lhs, rhs);
443441

444442
CondBr(cond_bcx, cond_val, set_bcx.llbb, next_bcx.llbb);
445443
}
@@ -454,7 +452,7 @@ pub fn write_content(bcx: block,
454452

455453
{ // i += 1
456454
let i = Load(inc_bcx, loop_counter);
457-
let plusone = Add(inc_bcx, i, C_i64(1));
455+
let plusone = Add(inc_bcx, i, C_uint(bcx.ccx(), 1));
458456
Store(inc_bcx, plusone, loop_counter);
459457

460458
Br(inc_bcx, cond_bcx.llbb);

0 commit comments

Comments
 (0)