Home | History | Annotate | Download | only in Mips
      1 ; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -soft-float -mips16-hard-float -relocation-model=pic -mips16-constant-islands -mips-constant-islands-no-load-relaxation  < %s | FileCheck %s -check-prefix=no-load-relax
      2 
      3 ; ModuleID = 'const4.c'
      4 target datalayout = "E-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32-S64"
      5 target triple = "mips--linux-gnu"
      6 
      7 @i = common global i32 0, align 4
      8 @b = common global i32 0, align 4
      9 @j = common global i32 0, align 4
     10 @k = common global i32 0, align 4
     11 @l = common global i32 0, align 4
     12 
     13 ; Function Attrs: nounwind
     14 define void @t() #0 {
     15 entry:
     16   store i32 -559023410, i32* @i, align 4
     17   %0 = load i32* @b, align 4
     18 ; no-load-relax:	lw	${{[0-9]+}}, $CPI0_1	# 16 bit inst
     19   %tobool = icmp ne i32 %0, 0
     20   br i1 %tobool, label %if.then, label %if.else
     21 ; no-load-relax:	beqz	${{[0-9]+}}, $BB0_3
     22 ; no-load-relax:	lw	${{[0-9]+}}, %call16(foo)(${{[0-9]+}})
     23 ; no-load-relax:	b	$BB0_4
     24 ; no-load-relax:	.align	2
     25 ; no-load-relax: $CPI0_1:
     26 ; no-load-relax:	.4byte	3735943886
     27 ; no-load-relax: $BB0_3:
     28 ; no-load-relax:	lw	${{[0-9]+}}, %call16(goo)(${{[0-9]+}})
     29 if.then:                                          ; preds = %entry
     30   call void bitcast (void (...)* @foo to void ()*)()
     31   br label %if.end
     32 
     33 if.else:                                          ; preds = %entry
     34   call void bitcast (void (...)* @goo to void ()*)()
     35   br label %if.end
     36 
     37 if.end:                                           ; preds = %if.else, %if.then
     38   call void bitcast (void (...)* @hoo to void ()*)()
     39   call void bitcast (void (...)* @hoo to void ()*)()
     40   call void bitcast (void (...)* @hoo to void ()*)()
     41   call void bitcast (void (...)* @hoo to void ()*)()
     42   call void bitcast (void (...)* @hoo to void ()*)()
     43   call void bitcast (void (...)* @hoo to void ()*)()
     44   call void bitcast (void (...)* @hoo to void ()*)()
     45   call void bitcast (void (...)* @hoo to void ()*)()
     46   call void bitcast (void (...)* @hoo to void ()*)()
     47   call void bitcast (void (...)* @hoo to void ()*)()
     48   call void bitcast (void (...)* @hoo to void ()*)()
     49   call void bitcast (void (...)* @hoo to void ()*)()
     50   call void bitcast (void (...)* @hoo to void ()*)()
     51   call void bitcast (void (...)* @hoo to void ()*)()
     52   call void bitcast (void (...)* @hoo to void ()*)()
     53   call void bitcast (void (...)* @hoo to void ()*)()
     54   call void bitcast (void (...)* @hoo to void ()*)()
     55   call void bitcast (void (...)* @hoo to void ()*)()
     56   call void bitcast (void (...)* @hoo to void ()*)()
     57   call void bitcast (void (...)* @hoo to void ()*)()
     58   call void bitcast (void (...)* @hoo to void ()*)()
     59   call void bitcast (void (...)* @hoo to void ()*)()
     60   call void bitcast (void (...)* @hoo to void ()*)()
     61   call void bitcast (void (...)* @hoo to void ()*)()
     62   call void bitcast (void (...)* @hoo to void ()*)()
     63   call void bitcast (void (...)* @hoo to void ()*)()
     64   call void bitcast (void (...)* @hoo to void ()*)()
     65   call void bitcast (void (...)* @hoo to void ()*)()
     66   call void bitcast (void (...)* @hoo to void ()*)()
     67   call void bitcast (void (...)* @hoo to void ()*)()
     68   call void bitcast (void (...)* @hoo to void ()*)()
     69   call void bitcast (void (...)* @hoo to void ()*)()
     70   call void bitcast (void (...)* @hoo to void ()*)()
     71   call void bitcast (void (...)* @hoo to void ()*)()
     72   call void bitcast (void (...)* @hoo to void ()*)()
     73   call void bitcast (void (...)* @hoo to void ()*)()
     74   call void bitcast (void (...)* @hoo to void ()*)()
     75   call void bitcast (void (...)* @hoo to void ()*)()
     76   call void bitcast (void (...)* @hoo to void ()*)()
     77   call void bitcast (void (...)* @hoo to void ()*)()
     78   call void bitcast (void (...)* @hoo to void ()*)()
     79   call void bitcast (void (...)* @hoo to void ()*)()
     80   call void bitcast (void (...)* @hoo to void ()*)()
     81   call void bitcast (void (...)* @hoo to void ()*)()
     82   call void bitcast (void (...)* @hoo to void ()*)()
     83   call void bitcast (void (...)* @hoo to void ()*)()
     84   call void bitcast (void (...)* @hoo to void ()*)()
     85   call void bitcast (void (...)* @hoo to void ()*)()
     86   call void bitcast (void (...)* @hoo to void ()*)()
     87   call void bitcast (void (...)* @hoo to void ()*)()
     88   call void bitcast (void (...)* @hoo to void ()*)()
     89   call void bitcast (void (...)* @hoo to void ()*)()
     90   call void bitcast (void (...)* @hoo to void ()*)()
     91   call void bitcast (void (...)* @hoo to void ()*)()
     92   call void bitcast (void (...)* @hoo to void ()*)()
     93   call void bitcast (void (...)* @hoo to void ()*)()
     94   call void bitcast (void (...)* @hoo to void ()*)()
     95   call void bitcast (void (...)* @hoo to void ()*)()
     96   call void bitcast (void (...)* @hoo to void ()*)()
     97   call void bitcast (void (...)* @hoo to void ()*)()
     98   call void bitcast (void (...)* @hoo to void ()*)()
     99   call void bitcast (void (...)* @hoo to void ()*)()
    100   call void bitcast (void (...)* @hoo to void ()*)()
    101   call void bitcast (void (...)* @hoo to void ()*)()
    102   call void bitcast (void (...)* @hoo to void ()*)()
    103   call void bitcast (void (...)* @hoo to void ()*)()
    104   call void bitcast (void (...)* @hoo to void ()*)()
    105   call void bitcast (void (...)* @hoo to void ()*)()
    106   call void bitcast (void (...)* @hoo to void ()*)()
    107   call void bitcast (void (...)* @hoo to void ()*)()
    108   call void bitcast (void (...)* @hoo to void ()*)()
    109   call void bitcast (void (...)* @hoo to void ()*)()
    110   call void bitcast (void (...)* @hoo to void ()*)()
    111   call void bitcast (void (...)* @hoo to void ()*)()
    112   call void bitcast (void (...)* @hoo to void ()*)()
    113   call void bitcast (void (...)* @hoo to void ()*)()
    114   call void bitcast (void (...)* @hoo to void ()*)()
    115   call void bitcast (void (...)* @hoo to void ()*)()
    116   call void bitcast (void (...)* @hoo to void ()*)()
    117   call void bitcast (void (...)* @hoo to void ()*)()
    118   call void bitcast (void (...)* @hoo to void ()*)()
    119   call void bitcast (void (...)* @hoo to void ()*)()
    120   call void bitcast (void (...)* @hoo to void ()*)()
    121   call void bitcast (void (...)* @hoo to void ()*)()
    122   call void bitcast (void (...)* @hoo to void ()*)()
    123   call void bitcast (void (...)* @hoo to void ()*)()
    124   call void bitcast (void (...)* @hoo to void ()*)()
    125   call void bitcast (void (...)* @hoo to void ()*)()
    126   call void bitcast (void (...)* @hoo to void ()*)()
    127   call void bitcast (void (...)* @hoo to void ()*)()
    128   call void bitcast (void (...)* @hoo to void ()*)()
    129   call void bitcast (void (...)* @hoo to void ()*)()
    130   call void bitcast (void (...)* @hoo to void ()*)()
    131   call void bitcast (void (...)* @hoo to void ()*)()
    132   call void bitcast (void (...)* @hoo to void ()*)()
    133   call void bitcast (void (...)* @hoo to void ()*)()
    134   call void bitcast (void (...)* @hoo to void ()*)()
    135   call void bitcast (void (...)* @hoo to void ()*)()
    136   call void bitcast (void (...)* @hoo to void ()*)()
    137   call void bitcast (void (...)* @hoo to void ()*)()
    138   call void bitcast (void (...)* @hoo to void ()*)()
    139   call void bitcast (void (...)* @hoo to void ()*)()
    140   call void bitcast (void (...)* @hoo to void ()*)()
    141   call void bitcast (void (...)* @hoo to void ()*)()
    142   call void bitcast (void (...)* @hoo to void ()*)()
    143   call void bitcast (void (...)* @hoo to void ()*)()
    144   call void bitcast (void (...)* @hoo to void ()*)()
    145   call void bitcast (void (...)* @hoo to void ()*)()
    146   call void bitcast (void (...)* @hoo to void ()*)()
    147   call void bitcast (void (...)* @hoo to void ()*)()
    148   call void bitcast (void (...)* @hoo to void ()*)()
    149   call void bitcast (void (...)* @hoo to void ()*)()
    150   call void bitcast (void (...)* @hoo to void ()*)()
    151   call void bitcast (void (...)* @hoo to void ()*)()
    152   call void bitcast (void (...)* @hoo to void ()*)()
    153   call void bitcast (void (...)* @hoo to void ()*)()
    154   call void bitcast (void (...)* @hoo to void ()*)()
    155   call void bitcast (void (...)* @hoo to void ()*)()
    156   call void bitcast (void (...)* @hoo to void ()*)()
    157   call void bitcast (void (...)* @hoo to void ()*)()
    158   call void bitcast (void (...)* @hoo to void ()*)()
    159   call void bitcast (void (...)* @hoo to void ()*)()
    160   call void bitcast (void (...)* @hoo to void ()*)()
    161   call void bitcast (void (...)* @hoo to void ()*)()
    162   call void bitcast (void (...)* @hoo to void ()*)()
    163   call void bitcast (void (...)* @hoo to void ()*)()
    164   call void bitcast (void (...)* @hoo to void ()*)()
    165   call void bitcast (void (...)* @hoo to void ()*)()
    166   ret void
    167 }
    168 
    169 declare void @foo(...) #1
    170 
    171 declare void @goo(...) #1
    172 
    173 declare void @hoo(...) #1
    174 
    175 attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="true" }
    176 attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="true" }
    177 
    178 !llvm.ident = !{!0}
    179 
    180 !0 = metadata !{metadata !"clang version 3.4 (gitosis (a] dmz-portal.mips.com:clang.git b310439121c875937d78cc49cc969bc1197fc025) (gitosis (a] dmz-portal.mips.com:llvm.git 7fc0ca9656ebec8dad61f72f5a5ddfb232c070fd)"}
    181