From 9032b78c987d08b9e1dd25b6ab94b305e717832e Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 1 May 2009 17:02:22 +0000 Subject: [PATCH] When printing a SCEVUnknown with pointer type, don't print an artificial "ptrtoint", as it tends to clutter up complicated expressions. The cast operators now print both source and destination types, which is usually sufficient. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70554 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/ScalarEvolution.cpp | 4 ---- test/Analysis/ScalarEvolution/max-trip-count.ll | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index ba1cbb156d1..d458399c055 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -434,11 +434,7 @@ const Type *SCEVUnknown::getType() const { } void SCEVUnknown::print(raw_ostream &OS) const { - if (isa(V->getType())) - OS << "(ptrtoint " << *V->getType() << " "; WriteAsOperand(OS, V, false); - if (isa(V->getType())) - OS << " to iPTR)"; } //===----------------------------------------------------------------------===// diff --git a/test/Analysis/ScalarEvolution/max-trip-count.ll b/test/Analysis/ScalarEvolution/max-trip-count.ll index ab88f1348ab..05674149da8 100644 --- a/test/Analysis/ScalarEvolution/max-trip-count.ll +++ b/test/Analysis/ScalarEvolution/max-trip-count.ll @@ -1,5 +1,5 @@ ; RUN: llvm-as < %s | opt -analyze -scalar-evolution -disable-output \ -; RUN: | grep {\{(ptrtoint i32\\* %d to iPTR),+,4\}} +; RUN: | grep {\{%d,+,4\}} define void @foo(i32* nocapture %d, i32 %n) nounwind { entry: -- 2.34.1