Guest User

Untitled

a guest
Jul 25th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 2.71 KB | None | 0 0
  1. define zeroext i16 @fps_mul(i16 zeroext %sf1, i16 zeroext %sf2) nounwind uwtable readnone {
  2.   %1 = icmp eq i16 %sf1, -32768
  3.   %2 = icmp eq i16 %sf2, -32768
  4.   %or.cond3 = or i1 %1, %2
  5.   br i1 %or.cond3, label %47, label %3
  6.  
  7. ; <label>:3                                       ; preds = %0
  8.   %4 = icmp eq i16 %sf1, 0
  9.   %5 = icmp eq i16 %sf2, 0
  10.   %or.cond = or i1 %4, %5
  11.   br i1 %or.cond, label %47, label %6
  12.  
  13. ; <label>:6                                       ; preds = %3
  14.   %7 = and i16 %sf1, 32767
  15.   %8 = icmp eq i16 %7, 32767
  16.   br i1 %8, label %12, label %9
  17.  
  18. ; <label>:9                                       ; preds = %6
  19.   %10 = and i16 %sf2, 32767
  20.   %11 = icmp eq i16 %10, 32767
  21.   br i1 %11, label %12, label %get_significand.exit
  22.  
  23. ; <label>:12                                      ; preds = %9, %6
  24.   %13 = xor i16 %sf2, %sf1
  25.   %14 = or i16 %13, 32767
  26.   br label %47
  27.  
  28. get_significand.exit:                             ; preds = %9
  29.   %15 = and i16 %sf1, 1023
  30.   %16 = or i16 %15, 1024
  31.   %phitmp = zext i16 %16 to i32
  32.   %17 = and i16 %sf1, 31744
  33.   %18 = and i16 %sf1, -32768
  34.   %19 = and i16 %sf2, 1023
  35.   %20 = or i16 %19, 1024
  36.   %phitmp4 = zext i16 %20 to i32
  37.   %21 = and i16 %sf2, 31744
  38.   %22 = and i16 %sf2, -32768
  39.   %23 = xor i16 %22, %18
  40.   %24 = mul nsw i32 %phitmp4, %phitmp
  41.   %25 = zext i16 %17 to i32
  42.   %26 = zext i16 %21 to i32
  43.   %27 = add nsw i32 %26, %25
  44.   %28 = icmp ugt i32 %24, 2097151
  45.   br i1 %28, label %29, label %32
  46.  
  47. ; <label>:29                                      ; preds = %get_significand.exit
  48.   %30 = lshr i32 %24, 11
  49.   %31 = add nsw i32 %27, 51200
  50.   br label %35
  51.  
  52. ; <label>:32                                      ; preds = %get_significand.exit
  53.   %33 = add nsw i32 %27, 50176
  54.   %34 = lshr i32 %24, 10
  55.   br label %35
  56.  
  57. ; <label>:35                                      ; preds = %32, %29
  58.   %mul.0 = phi i32 [ %30, %29 ], [ %34, %32 ]
  59.   %e.0.in = phi i32 [ %31, %29 ], [ %33, %32 ]
  60.   %e.0 = trunc i32 %e.0.in to i16
  61.   %36 = icmp slt i16 %e.0, 0
  62.   br i1 %36, label %37, label %41
  63.  
  64. ; <label>:37                                      ; preds = %35
  65.   %38 = icmp slt i32 %27, 15360
  66.   br i1 %38, label %47, label %39
  67.  
  68. ; <label>:39                                      ; preds = %37
  69.   %40 = icmp eq i16 %18, %22
  70.   %. = select i1 %40, i16 32767, i16 -1
  71.   br label %47
  72.  
  73. ; <label>:41                                      ; preds = %35
  74.   %42 = and i32 %mul.0, 1023
  75.   %43 = zext i16 %23 to i32
  76.   %44 = or i32 %e.0.in, %43
  77.   %45 = or i32 %44, %42
  78.   %46 = trunc i32 %45 to i16
  79.   br label %47
  80.  
  81. ; <label>:47                                      ; preds = %39, %37, %3, %0, %41, %12
  82.   %.0 = phi i16 [ %14, %12 ], [ %46, %41 ], [ -32768, %0 ], [ 0, %3 ], [ 32, %37 ], [ %., %39 ]
  83.   ret i16 %.0
  84. }
Add Comment
Please, Sign In to add comment