diff options
| author | Anthony Ramine <n.oxyde@gmail.com> | 2018-04-21 11:24:52 +0200 |
|---|---|---|
| committer | Anthony Ramine <n.oxyde@gmail.com> | 2018-04-21 12:15:32 +0200 |
| commit | 5d5fb97b6e8085cb920c1c10a9b298c3c7f2a53d (patch) | |
| tree | 72436cdd66e8c10ec309f609e190237b28dcc1ff | |
| parent | 65d201f7d682ad921ac6e67ac07f922aa63a8ce4 (diff) | |
| download | rust-5d5fb97b6e8085cb920c1c10a9b298c3c7f2a53d.tar.gz rust-5d5fb97b6e8085cb920c1c10a9b298c3c7f2a53d.zip | |
Remove hack around comparisons of i1 values (fixes #40980)
The regression test still passes without that 2 years old hack. The underlying LLVM bug has probably been fixed upstream since then.
| -rw-r--r-- | src/librustc_trans/mir/rvalue.rs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/librustc_trans/mir/rvalue.rs b/src/librustc_trans/mir/rvalue.rs index 93702bfbbf3..8b512ebcb00 100644 --- a/src/librustc_trans/mir/rvalue.rs +++ b/src/librustc_trans/mir/rvalue.rs @@ -514,7 +514,6 @@ impl<'a, 'tcx> FunctionCx<'a, 'tcx> { let is_float = input_ty.is_fp(); let is_signed = input_ty.is_signed(); let is_nil = input_ty.is_nil(); - let is_bool = input_ty.is_bool(); match op { mir::BinOp::Add => if is_float { bx.fadd(lhs, rhs) @@ -564,15 +563,6 @@ impl<'a, 'tcx> FunctionCx<'a, 'tcx> { lhs, rhs ) } else { - let (lhs, rhs) = if is_bool { - // FIXME(#36856) -- extend the bools into `i8` because - // LLVM's i1 comparisons are broken. - (bx.zext(lhs, Type::i8(bx.cx)), - bx.zext(rhs, Type::i8(bx.cx))) - } else { - (lhs, rhs) - }; - bx.icmp( base::bin_op_to_icmp_predicate(op.to_hir_binop(), is_signed), lhs, rhs |
