Skip to content

Commit

Permalink
icmp can handle raw pointers just fine, there's no need to cast to …
Browse files Browse the repository at this point in the history
…int.
  • Loading branch information
oli-obk committed Jun 21, 2020
1 parent 98e97a4 commit e465b22
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/librustc_codegen_llvm/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,6 @@ impl IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
"ptr_guaranteed_eq" | "ptr_guaranteed_ne" => {
let a = args[0].immediate();
let b = args[1].immediate();
let a = self.ptrtoint(a, self.type_isize());
let b = self.ptrtoint(b, self.type_isize());
if name == "ptr_guaranteed_eq" {
self.icmp(IntPredicate::IntEQ, a, b)
} else {
Expand Down

0 comments on commit e465b22

Please sign in to comment.