Home | History | Annotate | Download | only in Thumb2
      1 ; RUN: llc < %s -mtriple=thumbv8 -show-mc-encoding | FileCheck %s
      2 ; CHECK-NOT: orrsne r0, r1 @ encoding: [0x08,0x43]
      3 ; Narrow tORR cannot be predicated and set CPSR at the same time!
      4 
      5 declare void @f(i32)
      6 
      7 define void @initCloneLookups() #1 {
      8 entry:
      9   br label %for.cond1.preheader
     10 
     11 for.cond1.preheader:                              ; preds = %for.inc24, %entry
     12   %cmp108 = phi i1 [ true, %entry ], [ %cmp, %for.inc24 ]
     13   %y.0105 = phi i32 [ 1, %entry ], [ %inc25, %for.inc24 ]
     14   %notlhs = icmp slt i32 %y.0105, 6
     15   %notlhs69 = icmp sgt i32 %y.0105, 4
     16   %sub = add nsw i32 %y.0105, -1
     17   %cmp1.i = icmp sgt i32 %sub, 5
     18   %cmp1.i54 = icmp sgt i32 %y.0105, 5
     19   br i1 %cmp108, label %if.then.us, label %for.cond1.preheader.for.cond1.preheader.split_crit_edge
     20 
     21 for.cond1.preheader.for.cond1.preheader.split_crit_edge: ; preds = %for.cond1.preheader
     22   br i1 %notlhs, label %for.inc.us101, label %for.inc
     23 
     24 if.then.us:                                       ; preds = %for.cond1.preheader, %for.inc.us
     25   %x.071.us = phi i32 [ %inc.us.pre-phi, %for.inc.us ], [ 1, %for.cond1.preheader ]
     26   %notrhs.us = icmp sge i32 %x.071.us, %y.0105
     27   %or.cond44.not.us = or i1 %notrhs.us, %notlhs
     28   %notrhs70.us = icmp sle i32 %x.071.us, %y.0105
     29   %tobool.us = or i1 %notrhs70.us, %notlhs69
     30   %or.cond66.us = and i1 %or.cond44.not.us, %tobool.us
     31   br i1 %or.cond66.us, label %getHexxagonIndex.exit52.us, label %if.then.us.for.inc.us_crit_edge
     32 
     33 if.then.us.for.inc.us_crit_edge:                  ; preds = %if.then.us
     34   %inc.us.pre = add nsw i32 %x.071.us, 1
     35   br label %for.inc.us
     36 
     37 getHexxagonIndex.exit52.us:                       ; preds = %if.then.us
     38   %cmp3.i.us = icmp slt i32 %x.071.us, 5
     39   %or.cond.i.us = and i1 %cmp1.i, %cmp3.i.us
     40   %..i.us = sext i1 %or.cond.i.us to i32
     41   tail call void @f(i32 %..i.us) #3
     42   %add.us = add nsw i32 %x.071.us, 1
     43   %cmp3.i55.us = icmp slt i32 %add.us, 5
     44   %or.cond.i56.us = and i1 %cmp1.i54, %cmp3.i55.us
     45   %..i57.us = sext i1 %or.cond.i56.us to i32
     46   tail call void @f(i32 %..i57.us) #3
     47   %or.cond.i48.us = and i1 %notlhs69, %cmp3.i55.us
     48   %..i49.us = sext i1 %or.cond.i48.us to i32
     49   tail call void @f(i32 %..i49.us) #3
     50   br label %for.inc.us
     51 
     52 for.inc.us:                                       ; preds = %if.then.us.for.inc.us_crit_edge, %getHexxagonIndex.exit52.us
     53   %inc.us.pre-phi = phi i32 [ %inc.us.pre, %if.then.us.for.inc.us_crit_edge ], [ %add.us, %getHexxagonIndex.exit52.us ]
     54   %exitcond109 = icmp eq i32 %inc.us.pre-phi, 10
     55   br i1 %exitcond109, label %for.inc24, label %if.then.us
     56 
     57 for.inc.us101:                                    ; preds = %for.cond1.preheader.for.cond1.preheader.split_crit_edge, %for.inc.us101
     58   %x.071.us74 = phi i32 [ %add.us89, %for.inc.us101 ], [ 1, %for.cond1.preheader.for.cond1.preheader.split_crit_edge ]
     59   %cmp3.i.us84 = icmp slt i32 %x.071.us74, 5
     60   %or.cond.i.us85 = and i1 %cmp1.i, %cmp3.i.us84
     61   %..i.us86 = sext i1 %or.cond.i.us85 to i32
     62   tail call void @f(i32 %..i.us86) #3
     63   %add.us89 = add nsw i32 %x.071.us74, 1
     64   %cmp3.i55.us93 = icmp slt i32 %add.us89, 5
     65   %or.cond.i56.us94 = and i1 %cmp1.i54, %cmp3.i55.us93
     66   %..i57.us95 = sext i1 %or.cond.i56.us94 to i32
     67   tail call void @f(i32 %..i57.us95) #3
     68   %or.cond.i48.us97 = and i1 %notlhs69, %cmp3.i55.us93
     69   %..i49.us98 = sext i1 %or.cond.i48.us97 to i32
     70   tail call void @f(i32 %..i49.us98) #3
     71   %exitcond110 = icmp eq i32 %add.us89, 10
     72   br i1 %exitcond110, label %for.inc24, label %for.inc.us101
     73 
     74 for.inc:                                          ; preds = %for.cond1.preheader.for.cond1.preheader.split_crit_edge, %for.inc
     75   %x.071 = phi i32 [ %add, %for.inc ], [ 1, %for.cond1.preheader.for.cond1.preheader.split_crit_edge ]
     76   %cmp3.i = icmp slt i32 %x.071, 5
     77   %or.cond.i = and i1 %cmp1.i, %cmp3.i
     78   %..i = sext i1 %or.cond.i to i32
     79   tail call void @f(i32 %..i) #3
     80   %add = add nsw i32 %x.071, 1
     81   %cmp3.i55 = icmp slt i32 %add, 5
     82   %or.cond.i56 = and i1 %cmp1.i54, %cmp3.i55
     83   %..i57 = sext i1 %or.cond.i56 to i32
     84   tail call void @f(i32 %..i57) #3
     85   %or.cond.i48 = and i1 %notlhs69, %cmp3.i55
     86   %..i49 = sext i1 %or.cond.i48 to i32
     87   tail call void @f(i32 %..i49) #3
     88   %exitcond = icmp eq i32 %add, 10
     89   br i1 %exitcond, label %for.inc24, label %for.inc
     90 
     91 for.inc24:                                        ; preds = %for.inc, %for.inc.us101, %for.inc.us
     92   %inc25 = add nsw i32 %y.0105, 1
     93   %cmp = icmp slt i32 %inc25, 10
     94   %exitcond111 = icmp eq i32 %inc25, 10
     95   br i1 %exitcond111, label %for.end26, label %for.cond1.preheader
     96 
     97 for.end26:                                        ; preds = %for.inc24
     98   ret void
     99 }
    100 
    101