about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-04-27 18:53:16 +0000
committerbors <bors@rust-lang.org>2018-04-27 18:53:16 +0000
commita9975254ee6510cd1360417d3d145b56fb70b2e7 (patch)
tree435c11122551993da76eda94535ac845f7cc2184
parent3c43aa5677e17dfb9f5004522745a02e21a604a4 (diff)
parent5d5fb97b6e8085cb920c1c10a9b298c3c7f2a53d (diff)
downloadrust-a9975254ee6510cd1360417d3d145b56fb70b2e7.tar.gz
rust-a9975254ee6510cd1360417d3d145b56fb70b2e7.zip
Auto merge of #50137 - nox:rm-bool-cmp-hack, r=eddyb
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.rs10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/librustc_trans/mir/rvalue.rs b/src/librustc_trans/mir/rvalue.rs
index c932777402e..79e906ca975 100644
--- a/src/librustc_trans/mir/rvalue.rs
+++ b/src/librustc_trans/mir/rvalue.rs
@@ -536,7 +536,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)
@@ -586,15 +585,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