kevindevos9542

Alive k=1 report Transforms/LoopReroll/basic.ll

Sep 27th, 2020 (edited)
778
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. define void @pointer_bitcast_baseinst(* %arg, * %arg1, i8 %arg2) {
  2. %bb:
  3.   br label %bb3
  4.  
  5. %bb3:
  6.   %tmp = phi i8 [ 1, %bb ]
  7.   %tmp4 = add nuw i8 %tmp, 8
  8.   %tmp5 = shl nuw i8 %tmp, 1
  9.   %tmp6 = gep * %arg1, 1 x i8 %tmp5
  10.   %tmp8 = load i8, * %tmp6, align 1 ; LOAD 876
  11.   %tmp9 = shl i8 %tmp4, 1
  12.   %tmp10 = gep * %arg1, 1 x i8 %tmp9
  13.   %tmp12 = load i8, * %tmp10, align 1 ; LOAD 892
  14.   %tmp13 = gep * %arg, 1 x i8 %tmp
  15.   store i8 %tmp8, * %tmp13, align 1 ; STORE 892
  16.   %tmp15 = gep * %arg, 1 x i8 %tmp4
  17.   store i8 %tmp12, * %tmp15, align 1 ; STORE 900
  18.   %tmp17 = add nsw nuw i8 %tmp, 16
  19.   %tmp18 = icmp eq i8 %tmp17, %arg2
  20.   br i1 %tmp18, label %bb19, label %bb3_#body
  21.  
  22. %bb3_#body:
  23.   br label %bb3_#1
  24.  
  25. %bb3_#1:
  26.   %tmp_#1 = phi i8 [ %tmp17, %bb3_#body ]
  27.   %tmp4_#1 = add nuw i8 %tmp_#1, 8
  28.   %tmp5_#1 = shl nuw i8 %tmp_#1, 1
  29.   %tmp6_#1 = gep * %arg1, 1 x i8 %tmp5_#1
  30.   %tmp8_#1 = load i8, * %tmp6_#1, align 1
  31.   %tmp9_#1 = shl i8 %tmp4_#1, 1
  32.   %tmp10_#1 = gep * %arg1, 1 x i8 %tmp9_#1
  33.   %tmp12_#1 = load i8, * %tmp10_#1, align 1
  34.   %tmp13_#1 = gep * %arg, 1 x i8 %tmp_#1
  35.   store i8 %tmp8_#1, * %tmp13_#1, align 1
  36.   %tmp15_#1 = gep * %arg, 1 x i8 %tmp4_#1
  37.   store i8 %tmp12_#1, * %tmp15_#1, align 1
  38.   %tmp17_#1 = add nsw nuw i8 %tmp_#1, 16
  39.   %tmp18_#1 = icmp eq i8 %tmp17_#1, %arg2
  40.   br i1 %tmp18_#1, label %bb19, label #sink
  41.  
  42. %bb19:
  43.   ret void
  44. }
  45. =>
  46. define void @pointer_bitcast_baseinst(* %arg, * %arg1, i8 %arg2) {
  47. %bb:
  48.   %0 = add i8 %arg2, 239
  49.   %1 = lshr i8 %0, 4
  50.   %2 = shl nsw nuw i8 %1, 1
  51.   %3 = add i8 %2, 1
  52.   br label %bb3
  53.  
  54. %bb3:
  55.   %indvar = phi i8 [ 0, %bb ]
  56.   %4 = shl nuw i8 %indvar, 3
  57.   %5 = add i8 %4, 1
  58.   %tmp5 = shl nuw i8 %5, 1
  59.   %tmp6 = gep * %arg1, 1 x i8 %tmp5
  60.   %tmp8 = load i8, * %tmp6, align 1 ; LOAD 876
  61.   %tmp13 = gep * %arg, 1 x i8 %5
  62.   store i8 %tmp8, * %tmp13, align 1 ; STORE 892
  63.   %indvar.next = add i8 %indvar, 1
  64.   %exitcond = icmp eq i8 %indvar, %3
  65.   br i1 %exitcond, label %bb19, label %bb3_#body
  66.  
  67. %bb3_#body:
  68.   br label %bb3_#1
  69.  
  70. %bb3_#1:
  71.   %indvar_#1 = phi i8 [ %indvar.next, %bb3_#body ]
  72.   %4_#1 = shl nuw i8 %indvar_#1, 3
  73.   %5_#1 = add i8 %4_#1, 1
  74.   %tmp5_#1 = shl nuw i8 %5_#1, 1
  75.   %tmp6_#1 = gep * %arg1, 1 x i8 %tmp5_#1
  76.   %tmp8_#1 = load i8, * %tmp6_#1, align 1 ; LOAD 892
  77.   %tmp13_#1 = gep * %arg, 1 x i8 %5_#1
  78.   store i8 %tmp8_#1, * %tmp13_#1, align 1 ; STORE 900
  79.   %indvar.next_#1 = add i8 %indvar_#1, 1
  80.   %exitcond_#1 = icmp eq i8 %indvar_#1, %3
  81.   br i1 %exitcond_#1, label %bb19, label #sink
  82.  
  83. %bb19:
  84.   ret void
  85. }
  86.  
  87. num_locals_src: 0
  88. num_locals_tgt: 0
  89. num_nonlocals_src: 3
  90. num_nonlocals: 3
  91. bits_for_bid: 2
  92. bits_for_offset: 64
  93. bits_size_t: 64
  94. bits_program_pointer: 64
  95. max_alloc_size: 0
  96. min_access_size: 1
  97. max_access_size: 1
  98. bits_byte: 8
  99. bits_poison_per_byte: 1
  100. strlen_unroll_cnt: 10
  101. memcmp_unroll_cnt: 10
  102. little_endian: 1
  103. nullptr_is_used: 0
  104. has_int2ptr: 0
  105. has_ptr2int: 0
  106. has_malloc: 0
  107. has_free: 0
  108. has_null_block: 1
  109. does_ptr_store: 0
  110. does_mem_access: 1
  111. does_ptr_mem_access: 0
  112. does_int_mem_access: 1
  113. Transformation doesn't verify!
  114. ERROR: Mismatch in memory
  115.  
  116. Example:
  117. * %arg = pointer(non-local, block_id=1, offset=1261007895663738891)
  118. * %arg1 = pointer(non-local, block_id=1, offset=1261007895663738874)
  119. i8 %arg2 = #x11 (17)
  120.  
  121. Source:
  122. i8 %tmp = #x01 (1)
  123. i8 %tmp4 = #x09 (9)
  124. i8 %tmp5 = #x02 (2)
  125. * %tmp6 = pointer(non-local, block_id=1, offset=1261007895663738876)
  126. i8 %tmp8 = poison
  127. i8 %tmp9 = #x12 (18)
  128. * %tmp10 = pointer(non-local, block_id=1, offset=1261007895663738892)
  129. i8 %tmp12 = #x1a (26)
  130. * %tmp13 = pointer(non-local, block_id=1, offset=1261007895663738892)
  131. * %tmp15 = pointer(non-local, block_id=1, offset=1261007895663738900)
  132. i8 %tmp17 = #x11 (17)
  133. i1 %tmp18 = #x1 (1)
  134. i8 %tmp_#1 = #x11 (17)
  135. i8 %tmp4_#1 = #x19 (25)
  136. i8 %tmp5_#1 = #x22 (34)
  137. * %tmp6_#1 = pointer(non-local, block_id=1, offset=1261007895663738908)
  138. i8 %tmp8_#1 = #x00 (0)
  139. i8 %tmp9_#1 = #x32 (50)
  140. * %tmp10_#1 = pointer(non-local, block_id=1, offset=1261007895663738924)
  141. i8 %tmp12_#1 = #x00 (0)
  142. * %tmp13_#1 = pointer(non-local, block_id=1, offset=1261007895663738908)
  143. * %tmp15_#1 = pointer(non-local, block_id=1, offset=1261007895663738916)
  144. i8 %tmp17_#1 = #x21 (33)
  145. i1 %tmp18_#1 = #x0 (0)
  146.  
  147. SOURCE MEMORY STATE
  148. ===================
  149. NON-LOCAL BLOCKS:
  150. Block 0 >       size: 0 align: 1        alloc type: 0
  151. Block 1 >       size: 4684869512372158465       align: 2        alloc type: 0
  152. Block 2 >       align: 2        alloc type: 0
  153.  
  154. Target:
  155. i8 %0 = #x00 (0)
  156. i8 %1 = #x00 (0)
  157. i8 %2 = #x00 (0)
  158. i8 %3 = #x01 (1)
  159. i8 %indvar = #x00 (0)
  160. i8 %4 = #x00 (0)
  161. i8 %5 = #x01 (1)
  162. i8 %tmp5 = #x02 (2)
  163. * %tmp6 = pointer(non-local, block_id=1, offset=1261007895663738876)
  164. i8 %tmp8 = poison
  165. * %tmp13 = pointer(non-local, block_id=1, offset=1261007895663738892)
  166. i8 %indvar.next = #x01 (1)
  167. i1 %exitcond = #x0 (0)
  168. i8 %indvar_#1 = #x01 (1)
  169. i8 %4_#1 = #x08 (8)
  170. i8 %5_#1 = #x09 (9)
  171. i8 %tmp5_#1 = #x12 (18)
  172. * %tmp6_#1 = pointer(non-local, block_id=1, offset=1261007895663738892)
  173. i8 %tmp8_#1 = poison
  174. * %tmp13_#1 = pointer(non-local, block_id=1, offset=1261007895663738900)
  175. i8 %indvar.next_#1 = #x02 (2)
  176. i1 %exitcond_#1 = #x1 (1)
  177.  
  178. Mismatch in pointer(non-local, block_id=1, offset=1261007895663738900)
  179. Source value: #x1a
  180. Target value: poison
RAW Paste Data