llvm-6502/test/Analysis/ScalarEvolution/smax.ll
Dan Gohman 8dae138d06 Fix WriteAsOperand to not emit a leading space character. Adjust
its callers to emit a space character before calling it when a
space is needed.

This fixes several spurious whitespace issues in
ScalarEvolution's debug dumps. See the test changes for
examples.

This also fixes odd space-after-tab indentation in the output
for switch statements, and changes calls from being printed like
this:
  call void @foo( i32 %x )
to this:
  call void @foo(i32 %x)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56196 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-14 17:21:12 +00:00

13 lines
360 B
LLVM

; RUN: llvm-as < %s | opt -analyze -scalar-evolution | grep smax | count 2
; RUN: llvm-as < %s | opt -analyze -scalar-evolution | grep \
; RUN: {%. smax %. smax %.}
; PR1614
define i32 @x(i32 %a, i32 %b, i32 %c) {
%A = icmp sgt i32 %a, %b
%B = select i1 %A, i32 %a, i32 %b
%C = icmp sle i32 %c, %B
%D = select i1 %C, i32 %B, i32 %c
ret i32 %D
}