[InstCombine] Signed saturation tests. NFC
[llvm-core.git] / test / Transforms / NewGVN / pr43441.ll
blob5b4fc3937f3226ca053804e9ae5292eb627fba26
1 ; RUN: opt -newgvn -S < %s | FileCheck %s
3 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-unknown-linux-gnu"
6 ; CHECK-LABEL: @print_long_format()
7 define dso_local void @print_long_format() #0 {
8 entry:
9   switch i32 undef, label %sw.default [
10     i32 1, label %sw.bb
11     i32 0, label %sw.bb19
12     i32 2, label %sw.bb23
13   ]
15 sw.bb:                                            ; preds = %entry
16   unreachable
18 sw.bb19:                                          ; preds = %entry
19   br i1 undef, label %if.then37, label %if.end50
21 sw.bb23:                                          ; preds = %entry
22   unreachable
24 sw.default:                                       ; preds = %entry
25   unreachable
27 if.then37:                                        ; preds = %sw.bb19
28   unreachable
30 if.end50:                                         ; preds = %sw.bb19
31   %call180 = call i32 @timespec_cmp() #2
32   %cmp181 = icmp slt i32 %call180, 0
33   ret void
36 ; Function Attrs: writeonly
37 declare dso_local i32 @timespec_cmp() #1
39 attributes #0 = { "use-soft-float"="false" }
40 attributes #1 = { writeonly }
41 attributes #2 = { nounwind readonly }