Skip to content

Commit e465b22

Browse files
committed
icmp can handle raw pointers just fine, there's no need to cast to int.
1 parent 98e97a4 commit e465b22

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/librustc_codegen_llvm/intrinsic.rs

-2
Original file line numberDiff line numberDiff line change
@@ -734,8 +734,6 @@ impl IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
734734
"ptr_guaranteed_eq" | "ptr_guaranteed_ne" => {
735735
let a = args[0].immediate();
736736
let b = args[1].immediate();
737-
let a = self.ptrtoint(a, self.type_isize());
738-
let b = self.ptrtoint(b, self.type_isize());
739737
if name == "ptr_guaranteed_eq" {
740738
self.icmp(IntPredicate::IntEQ, a, b)
741739
} else {

0 commit comments

Comments
 (0)