forked from OSchip/llvm-project
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. llvm-svn: 70554
This commit is contained in:
parent
150b4c3890
commit
7227bc88f0
|
@ -434,11 +434,7 @@ const Type *SCEVUnknown::getType() const {
|
|||
}
|
||||
|
||||
void SCEVUnknown::print(raw_ostream &OS) const {
|
||||
if (isa<PointerType>(V->getType()))
|
||||
OS << "(ptrtoint " << *V->getType() << " ";
|
||||
WriteAsOperand(OS, V, false);
|
||||
if (isa<PointerType>(V->getType()))
|
||||
OS << " to iPTR)";
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
; RUN: llvm-as < %s | opt -analyze -scalar-evolution -disable-output \
|
||||
; RUN: | grep {\{(ptrtoint i32\\* %d to iPTR),+,4\}<bb>}
|
||||
; RUN: | grep {\{%d,+,4\}<bb>}
|
||||
|
||||
define void @foo(i32* nocapture %d, i32 %n) nounwind {
|
||||
entry:
|
||||
|
|
Loading…
Reference in New Issue