blob: 6febaa6b40df863c529f8bf99a923ffada262214 [file] [log] [blame]
Dan Gohman26793ed2010-01-25 21:55:39 +00001; RUN: llvm-as < %s | llvm-dis > %t0
2; RUN: opt -S < %s > %t1
3; RUN: diff %t0 %t1
Duncan P. N. Exon Smith13f5c582014-08-19 21:08:27 +00004; RUN: verify-uselistorder < %s
Dan Gohman26793ed2010-01-25 21:55:39 +00005; PR6140
6
7; Make sure the flags are serialized/deserialized properly for both
8; forward and backward references.
9
10define void @foo() nounwind {
11entry:
12 br label %first
13
14second: ; preds = %first
15 %u = add nuw i32 %a, 0 ; <i32> [#uses=0]
16 %s = add nsw i32 %a, 0 ; <i32> [#uses=0]
17 %us = add nuw nsw i32 %a, 0 ; <i32> [#uses=0]
18 %z = add i32 %a, 0 ; <i32> [#uses=0]
19 unreachable
20
21first: ; preds = %entry
22 %a = bitcast i32 0 to i32 ; <i32> [#uses=8]
23 %uu = add nuw i32 %a, 0 ; <i32> [#uses=0]
24 %ss = add nsw i32 %a, 0 ; <i32> [#uses=0]
25 %uuss = add nuw nsw i32 %a, 0 ; <i32> [#uses=0]
26 %zz = add i32 %a, 0 ; <i32> [#uses=0]
27 br label %second
28}