This should always be signed chars, so use int8_t. This fixes a miscompile when
[llvm/stm8.git] / test / CodeGen / X86 / pr1462.ll
blob62549a50356a3e9513d33d5c0b96c30b1f3ffc40
1 ; RUN: llc < %s
2 ; PR1462
4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-
5 v64:64:64-v128:128:128-a0:0:64"
6 target triple = "x86_64-unknown-linux-gnu"
8 define hidden i128 @__addvti3(i128 %a1, i128 %b2) {
9 entry:
10         %tmp8 = add i128 %b2, %a1               ; <i128> [#uses=3]
11         %tmp10 = icmp sgt i128 %b2, -1          ; <i1> [#uses=1]
12         %tmp18 = icmp sgt i128 %tmp8, %a1               ; <i1> [#uses=1]
13         %tmp14 = icmp slt i128 %tmp8, %a1               ; <i1> [#uses=1]
14         %iftmp.0.0.in = select i1 %tmp10, i1 %tmp14, i1 %tmp18          ; <i1> [#uses=1]
15         br i1 %iftmp.0.0.in, label %cond_true22, label %cond_next23
17 cond_true22:            ; preds = %entry
18         tail call void @abort( )
19         unreachable
21 cond_next23:            ; preds = %entry
22         ret i128 %tmp8
25 declare void @abort()