summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode/flags.ll
blob: 6febaa6b40df863c529f8bf99a923ffada262214 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
; RUN: llvm-as < %s | llvm-dis > %t0
; RUN: opt -S < %s > %t1
; RUN: diff %t0 %t1
; RUN: verify-uselistorder < %s
; PR6140

; Make sure the flags are serialized/deserialized properly for both
; forward and backward references.

define void @foo() nounwind {
entry:
  br label %first

second:                                           ; preds = %first
  %u = add nuw i32 %a, 0                          ; <i32> [#uses=0]
  %s = add nsw i32 %a, 0                          ; <i32> [#uses=0]
  %us = add nuw nsw i32 %a, 0                     ; <i32> [#uses=0]
  %z = add i32 %a, 0                              ; <i32> [#uses=0]
  unreachable

first:                                            ; preds = %entry
  %a = bitcast i32 0 to i32                       ; <i32> [#uses=8]
  %uu = add nuw i32 %a, 0                         ; <i32> [#uses=0]
  %ss = add nsw i32 %a, 0                         ; <i32> [#uses=0]
  %uuss = add nuw nsw i32 %a, 0                   ; <i32> [#uses=0]
  %zz = add i32 %a, 0                             ; <i32> [#uses=0]
  br label %second
}
OpenPOWER on IntegriCloud