xref: /llvm-project/llvm/test/CodeGen/MSP430/umulo-16.ll (revision 171056ff5778c40df916c5a4cea84ea6320b965f)
1; RUN: llc < %s -mtriple=msp430 | FileCheck %s
2target datalayout = "e-m:e-p:16:16-i32:16:32-a:16-n8:16"
3target triple = "msp430"
4
5define void @foo(i16 %arg) unnamed_addr {
6entry-block:
7  br i1 undef, label %bb2, label %bb3
8
9bb2:                                              ; preds = %entry-block
10  unreachable
11
12bb3:                                              ; preds = %entry-block
13  %0 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 undef, i16 %arg)
14; CHECK: call
15  %1 = extractvalue { i16, i1 } %0, 1
16  %2 = call i1 @llvm.expect.i1(i1 %1, i1 false)
17  br i1 %2, label %panic, label %bb5
18
19bb5:                                              ; preds = %bb3
20  unreachable
21
22panic:                                            ; preds = %bb3
23  unreachable
24}
25
26; Function Attrs: nounwind readnone
27declare i1 @llvm.expect.i1(i1, i1) #0
28
29; Function Attrs: nounwind readnone
30declare { i16, i1 } @llvm.umul.with.overflow.i16(i16, i16) #0
31
32attributes #0 = { nounwind readnone }
33