1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-30 15:32:52 +01:00
llvm-mirror/test/Bitcode/flags.ll
Dan Gohman 18bbc20ac8 Fix the bitcode reader to deserialize nuw/nsw/etc. bits properly in the case
of a forward-reference, which doesn't use an "abbrev" encoding.

llvm-svn: 94454
2010-01-25 21:55:39 +00:00

28 lines
1.0 KiB
LLVM

; RUN: llvm-as < %s | llvm-dis > %t0
; RUN: opt -S < %s > %t1
; RUN: diff %t0 %t1
; 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
}