1
Fork 0

icmp can handle raw pointers just fine, there's no need to cast to int.

This commit is contained in:
Oliver Scherer 2020-06-21 13:17:05 +02:00
parent 98e97a46e2
commit e465b227d1

View file

@ -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 {