[llvm-dev] instcombine produces strange i32*

Frank Winter via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 14 12:17:12 PDT 2016


I am getting wrong code from one of the passes, namely instcombine. I
see it in my JIT application when calling the pass directly through a
pass manager.
It was not possible for me to reproduce this behaviour with 'opt'
however I could isolate the IR and write a minimal 'opt' myself and
reproduce it.

As you can see the input IR (f.ll) operates most of the time with
floating point numbers and strangly the instcombine pass replaces some
float* with i32*. This is wrong and completely messes up the code and
gives strange restults and segfaults.

I attach the input IR, program and output:

f.ll (input IR)
main.cc (reads f.ll and applies the passes and prints out the
resulting IR)
f_main.ll (output of main)

You can see in f_main.ll strange bitcasts and loads to i32*.

   %31 = getelementptr float, float* %arg3, i64 %13
   %32 = bitcast float* %31 to i32*
   %33 = load i32, i32* %32, align 4

I tried to mimic this with 'opt' with the following command

opt -basicaa -licm -gvn -mem2reg -loop-vectorize -early-cse
-instcombine -S f.ll

This doesn't reproduce the behaviour.

I am seeing this in LLVM 3.8 and 3.9. This is a longer-standing issue
and probably not fixed in trunk right now.

Any idea?

Frank

-------------- next part --------------
define void @main(i64 %lo, i64 %hi, i64 %myId, i1 %ordered, i64 %start, float* noalias align 64 %arg0, i64 %arg1, i64 %arg2, float* noalias align 64 %arg3, i64 %arg4, i64 %arg5, float* noalias align 64 %arg6) {
entrypoint:
  br i1 %ordered, label %L0, label %L1

L0:                                               ; preds = %entrypoint
  %0 = add nsw i64 %lo, %start
  %1 = add nsw i64 %hi, %start
  br label %L2

L1:                                               ; preds = %entrypoint
  br label %L2

L2:                                               ; preds = %L0, %L1
  %2 = phi i64 [ %lo, %L1 ], [ %0, %L0 ]
  %3 = phi i64 [ %hi, %L1 ], [ %1, %L0 ]
  %4 = sdiv i64 %2, 8
  %5 = sdiv i64 %3, 8
  br label %L5

L3:                                               ; preds = %L7, %L5
  %6 = phi i64 [ %442, %L7 ], [ 0, %L5 ]
  %7 = mul i64 %441, 1
  %8 = add nsw i64 %7, 0
  %9 = mul i64 %8, 9
  %10 = add nsw i64 %9, 0
  %11 = mul i64 %10, 2
  %12 = add nsw i64 %11, 0
  %13 = mul i64 %12, 8
  %14 = add nsw i64 %13, %6
  %15 = mul i64 %441, 1
  %16 = add nsw i64 %15, 0
  %17 = mul i64 %16, 9
  %18 = add nsw i64 %17, 0
  %19 = mul i64 %18, 2
  %20 = add nsw i64 %19, 1
  %21 = mul i64 %20, 8
  %22 = add nsw i64 %21, %6
  %23 = mul i64 %441, 1
  %24 = add nsw i64 %23, 0
  %25 = mul i64 %24, 9
  %26 = add nsw i64 %25, 1
  %27 = mul i64 %26, 2
  %28 = add nsw i64 %27, 0
  %29 = mul i64 %28, 8
  %30 = add nsw i64 %29, %6
  %31 = mul i64 %441, 1
  %32 = add nsw i64 %31, 0
  %33 = mul i64 %32, 9
  %34 = add nsw i64 %33, 1
  %35 = mul i64 %34, 2
  %36 = add nsw i64 %35, 1
  %37 = mul i64 %36, 8
  %38 = add nsw i64 %37, %6
  %39 = mul i64 %441, 1
  %40 = add nsw i64 %39, 0
  %41 = mul i64 %40, 9
  %42 = add nsw i64 %41, 2
  %43 = mul i64 %42, 2
  %44 = add nsw i64 %43, 0
  %45 = mul i64 %44, 8
  %46 = add nsw i64 %45, %6
  %47 = mul i64 %441, 1
  %48 = add nsw i64 %47, 0
  %49 = mul i64 %48, 9
  %50 = add nsw i64 %49, 2
  %51 = mul i64 %50, 2
  %52 = add nsw i64 %51, 1
  %53 = mul i64 %52, 8
  %54 = add nsw i64 %53, %6
  %55 = mul i64 %441, 1
  %56 = add nsw i64 %55, 0
  %57 = mul i64 %56, 9
  %58 = add nsw i64 %57, 3
  %59 = mul i64 %58, 2
  %60 = add nsw i64 %59, 0
  %61 = mul i64 %60, 8
  %62 = add nsw i64 %61, %6
  %63 = mul i64 %441, 1
  %64 = add nsw i64 %63, 0
  %65 = mul i64 %64, 9
  %66 = add nsw i64 %65, 3
  %67 = mul i64 %66, 2
  %68 = add nsw i64 %67, 1
  %69 = mul i64 %68, 8
  %70 = add nsw i64 %69, %6
  %71 = mul i64 %441, 1
  %72 = add nsw i64 %71, 0
  %73 = mul i64 %72, 9
  %74 = add nsw i64 %73, 4
  %75 = mul i64 %74, 2
  %76 = add nsw i64 %75, 0
  %77 = mul i64 %76, 8
  %78 = add nsw i64 %77, %6
  %79 = mul i64 %441, 1
  %80 = add nsw i64 %79, 0
  %81 = mul i64 %80, 9
  %82 = add nsw i64 %81, 4
  %83 = mul i64 %82, 2
  %84 = add nsw i64 %83, 1
  %85 = mul i64 %84, 8
  %86 = add nsw i64 %85, %6
  %87 = mul i64 %441, 1
  %88 = add nsw i64 %87, 0
  %89 = mul i64 %88, 9
  %90 = add nsw i64 %89, 5
  %91 = mul i64 %90, 2
  %92 = add nsw i64 %91, 0
  %93 = mul i64 %92, 8
  %94 = add nsw i64 %93, %6
  %95 = mul i64 %441, 1
  %96 = add nsw i64 %95, 0
  %97 = mul i64 %96, 9
  %98 = add nsw i64 %97, 5
  %99 = mul i64 %98, 2
  %100 = add nsw i64 %99, 1
  %101 = mul i64 %100, 8
  %102 = add nsw i64 %101, %6
  %103 = mul i64 %441, 1
  %104 = add nsw i64 %103, 0
  %105 = mul i64 %104, 9
  %106 = add nsw i64 %105, 6
  %107 = mul i64 %106, 2
  %108 = add nsw i64 %107, 0
  %109 = mul i64 %108, 8
  %110 = add nsw i64 %109, %6
  %111 = mul i64 %441, 1
  %112 = add nsw i64 %111, 0
  %113 = mul i64 %112, 9
  %114 = add nsw i64 %113, 6
  %115 = mul i64 %114, 2
  %116 = add nsw i64 %115, 1
  %117 = mul i64 %116, 8
  %118 = add nsw i64 %117, %6
  %119 = mul i64 %441, 1
  %120 = add nsw i64 %119, 0
  %121 = mul i64 %120, 9
  %122 = add nsw i64 %121, 7
  %123 = mul i64 %122, 2
  %124 = add nsw i64 %123, 0
  %125 = mul i64 %124, 8
  %126 = add nsw i64 %125, %6
  %127 = mul i64 %441, 1
  %128 = add nsw i64 %127, 0
  %129 = mul i64 %128, 9
  %130 = add nsw i64 %129, 7
  %131 = mul i64 %130, 2
  %132 = add nsw i64 %131, 1
  %133 = mul i64 %132, 8
  %134 = add nsw i64 %133, %6
  %135 = mul i64 %441, 1
  %136 = add nsw i64 %135, 0
  %137 = mul i64 %136, 9
  %138 = add nsw i64 %137, 8
  %139 = mul i64 %138, 2
  %140 = add nsw i64 %139, 0
  %141 = mul i64 %140, 8
  %142 = add nsw i64 %141, %6
  %143 = mul i64 %441, 1
  %144 = add nsw i64 %143, 0
  %145 = mul i64 %144, 9
  %146 = add nsw i64 %145, 8
  %147 = mul i64 %146, 2
  %148 = add nsw i64 %147, 1
  %149 = mul i64 %148, 8
  %150 = add nsw i64 %149, %6
  %151 = getelementptr float, float* %arg3, i64 %14
  %152 = load float, float* %151
  %153 = getelementptr float, float* %arg3, i64 %22
  %154 = load float, float* %153
  %155 = getelementptr float, float* %arg3, i64 %30
  %156 = load float, float* %155
  %157 = getelementptr float, float* %arg3, i64 %38
  %158 = load float, float* %157
  %159 = getelementptr float, float* %arg3, i64 %46
  %160 = load float, float* %159
  %161 = getelementptr float, float* %arg3, i64 %54
  %162 = load float, float* %161
  %163 = getelementptr float, float* %arg3, i64 %62
  %164 = load float, float* %163
  %165 = getelementptr float, float* %arg3, i64 %70
  %166 = load float, float* %165
  %167 = getelementptr float, float* %arg3, i64 %78
  %168 = load float, float* %167
  %169 = getelementptr float, float* %arg3, i64 %86
  %170 = load float, float* %169
  %171 = getelementptr float, float* %arg3, i64 %94
  %172 = load float, float* %171
  %173 = getelementptr float, float* %arg3, i64 %102
  %174 = load float, float* %173
  %175 = getelementptr float, float* %arg3, i64 %110
  %176 = load float, float* %175
  %177 = getelementptr float, float* %arg3, i64 %118
  %178 = load float, float* %177
  %179 = getelementptr float, float* %arg3, i64 %126
  %180 = load float, float* %179
  %181 = getelementptr float, float* %arg3, i64 %134
  %182 = load float, float* %181
  %183 = getelementptr float, float* %arg3, i64 %142
  %184 = load float, float* %183
  %185 = getelementptr float, float* %arg3, i64 %150
  %186 = load float, float* %185
  %187 = alloca float, i32 18
  %188 = getelementptr float, float* %187, i32 0
  store float %152, float* %188
  %189 = getelementptr float, float* %187, i32 1
  store float %154, float* %189
  %190 = getelementptr float, float* %187, i32 2
  store float %156, float* %190
  %191 = getelementptr float, float* %187, i32 3
  store float %158, float* %191
  %192 = getelementptr float, float* %187, i32 4
  store float %160, float* %192
  %193 = getelementptr float, float* %187, i32 5
  store float %162, float* %193
  %194 = getelementptr float, float* %187, i32 6
  store float %164, float* %194
  %195 = getelementptr float, float* %187, i32 7
  store float %166, float* %195
  %196 = getelementptr float, float* %187, i32 8
  store float %168, float* %196
  %197 = getelementptr float, float* %187, i32 9
  store float %170, float* %197
  %198 = getelementptr float, float* %187, i32 10
  store float %172, float* %198
  %199 = getelementptr float, float* %187, i32 11
  store float %174, float* %199
  %200 = getelementptr float, float* %187, i32 12
  store float %176, float* %200
  %201 = getelementptr float, float* %187, i32 13
  store float %178, float* %201
  %202 = getelementptr float, float* %187, i32 14
  store float %180, float* %202
  %203 = getelementptr float, float* %187, i32 15
  store float %182, float* %203
  %204 = getelementptr float, float* %187, i32 16
  store float %184, float* %204
  %205 = getelementptr float, float* %187, i32 17
  store float %186, float* %205
  %206 = mul i64 %arg1, 3
  %207 = add nsw i64 %206, %arg2
  %208 = add nsw i64 0, %207
  %209 = mul i64 %208, 2
  %210 = add nsw i64 %209, 0
  %211 = add nsw i64 0, %207
  %212 = mul i64 %211, 2
  %213 = add nsw i64 %212, 1
  %214 = getelementptr float, float* %187, i64 %210
  %215 = load float, float* %214
  %216 = getelementptr float, float* %187, i64 %213
  %217 = load float, float* %216
  %218 = mul i64 %441, 1
  %219 = add nsw i64 %218, 0
  %220 = mul i64 %219, 9
  %221 = add nsw i64 %220, 0
  %222 = mul i64 %221, 2
  %223 = add nsw i64 %222, 0
  %224 = mul i64 %223, 8
  %225 = add nsw i64 %224, %6
  %226 = mul i64 %441, 1
  %227 = add nsw i64 %226, 0
  %228 = mul i64 %227, 9
  %229 = add nsw i64 %228, 0
  %230 = mul i64 %229, 2
  %231 = add nsw i64 %230, 1
  %232 = mul i64 %231, 8
  %233 = add nsw i64 %232, %6
  %234 = mul i64 %441, 1
  %235 = add nsw i64 %234, 0
  %236 = mul i64 %235, 9
  %237 = add nsw i64 %236, 1
  %238 = mul i64 %237, 2
  %239 = add nsw i64 %238, 0
  %240 = mul i64 %239, 8
  %241 = add nsw i64 %240, %6
  %242 = mul i64 %441, 1
  %243 = add nsw i64 %242, 0
  %244 = mul i64 %243, 9
  %245 = add nsw i64 %244, 1
  %246 = mul i64 %245, 2
  %247 = add nsw i64 %246, 1
  %248 = mul i64 %247, 8
  %249 = add nsw i64 %248, %6
  %250 = mul i64 %441, 1
  %251 = add nsw i64 %250, 0
  %252 = mul i64 %251, 9
  %253 = add nsw i64 %252, 2
  %254 = mul i64 %253, 2
  %255 = add nsw i64 %254, 0
  %256 = mul i64 %255, 8
  %257 = add nsw i64 %256, %6
  %258 = mul i64 %441, 1
  %259 = add nsw i64 %258, 0
  %260 = mul i64 %259, 9
  %261 = add nsw i64 %260, 2
  %262 = mul i64 %261, 2
  %263 = add nsw i64 %262, 1
  %264 = mul i64 %263, 8
  %265 = add nsw i64 %264, %6
  %266 = mul i64 %441, 1
  %267 = add nsw i64 %266, 0
  %268 = mul i64 %267, 9
  %269 = add nsw i64 %268, 3
  %270 = mul i64 %269, 2
  %271 = add nsw i64 %270, 0
  %272 = mul i64 %271, 8
  %273 = add nsw i64 %272, %6
  %274 = mul i64 %441, 1
  %275 = add nsw i64 %274, 0
  %276 = mul i64 %275, 9
  %277 = add nsw i64 %276, 3
  %278 = mul i64 %277, 2
  %279 = add nsw i64 %278, 1
  %280 = mul i64 %279, 8
  %281 = add nsw i64 %280, %6
  %282 = mul i64 %441, 1
  %283 = add nsw i64 %282, 0
  %284 = mul i64 %283, 9
  %285 = add nsw i64 %284, 4
  %286 = mul i64 %285, 2
  %287 = add nsw i64 %286, 0
  %288 = mul i64 %287, 8
  %289 = add nsw i64 %288, %6
  %290 = mul i64 %441, 1
  %291 = add nsw i64 %290, 0
  %292 = mul i64 %291, 9
  %293 = add nsw i64 %292, 4
  %294 = mul i64 %293, 2
  %295 = add nsw i64 %294, 1
  %296 = mul i64 %295, 8
  %297 = add nsw i64 %296, %6
  %298 = mul i64 %441, 1
  %299 = add nsw i64 %298, 0
  %300 = mul i64 %299, 9
  %301 = add nsw i64 %300, 5
  %302 = mul i64 %301, 2
  %303 = add nsw i64 %302, 0
  %304 = mul i64 %303, 8
  %305 = add nsw i64 %304, %6
  %306 = mul i64 %441, 1
  %307 = add nsw i64 %306, 0
  %308 = mul i64 %307, 9
  %309 = add nsw i64 %308, 5
  %310 = mul i64 %309, 2
  %311 = add nsw i64 %310, 1
  %312 = mul i64 %311, 8
  %313 = add nsw i64 %312, %6
  %314 = mul i64 %441, 1
  %315 = add nsw i64 %314, 0
  %316 = mul i64 %315, 9
  %317 = add nsw i64 %316, 6
  %318 = mul i64 %317, 2
  %319 = add nsw i64 %318, 0
  %320 = mul i64 %319, 8
  %321 = add nsw i64 %320, %6
  %322 = mul i64 %441, 1
  %323 = add nsw i64 %322, 0
  %324 = mul i64 %323, 9
  %325 = add nsw i64 %324, 6
  %326 = mul i64 %325, 2
  %327 = add nsw i64 %326, 1
  %328 = mul i64 %327, 8
  %329 = add nsw i64 %328, %6
  %330 = mul i64 %441, 1
  %331 = add nsw i64 %330, 0
  %332 = mul i64 %331, 9
  %333 = add nsw i64 %332, 7
  %334 = mul i64 %333, 2
  %335 = add nsw i64 %334, 0
  %336 = mul i64 %335, 8
  %337 = add nsw i64 %336, %6
  %338 = mul i64 %441, 1
  %339 = add nsw i64 %338, 0
  %340 = mul i64 %339, 9
  %341 = add nsw i64 %340, 7
  %342 = mul i64 %341, 2
  %343 = add nsw i64 %342, 1
  %344 = mul i64 %343, 8
  %345 = add nsw i64 %344, %6
  %346 = mul i64 %441, 1
  %347 = add nsw i64 %346, 0
  %348 = mul i64 %347, 9
  %349 = add nsw i64 %348, 8
  %350 = mul i64 %349, 2
  %351 = add nsw i64 %350, 0
  %352 = mul i64 %351, 8
  %353 = add nsw i64 %352, %6
  %354 = mul i64 %441, 1
  %355 = add nsw i64 %354, 0
  %356 = mul i64 %355, 9
  %357 = add nsw i64 %356, 8
  %358 = mul i64 %357, 2
  %359 = add nsw i64 %358, 1
  %360 = mul i64 %359, 8
  %361 = add nsw i64 %360, %6
  %362 = getelementptr float, float* %arg6, i64 %225
  %363 = load float, float* %362
  %364 = getelementptr float, float* %arg6, i64 %233
  %365 = load float, float* %364
  %366 = getelementptr float, float* %arg6, i64 %241
  %367 = load float, float* %366
  %368 = getelementptr float, float* %arg6, i64 %249
  %369 = load float, float* %368
  %370 = getelementptr float, float* %arg6, i64 %257
  %371 = load float, float* %370
  %372 = getelementptr float, float* %arg6, i64 %265
  %373 = load float, float* %372
  %374 = getelementptr float, float* %arg6, i64 %273
  %375 = load float, float* %374
  %376 = getelementptr float, float* %arg6, i64 %281
  %377 = load float, float* %376
  %378 = getelementptr float, float* %arg6, i64 %289
  %379 = load float, float* %378
  %380 = getelementptr float, float* %arg6, i64 %297
  %381 = load float, float* %380
  %382 = getelementptr float, float* %arg6, i64 %305
  %383 = load float, float* %382
  %384 = getelementptr float, float* %arg6, i64 %313
  %385 = load float, float* %384
  %386 = getelementptr float, float* %arg6, i64 %321
  %387 = load float, float* %386
  %388 = getelementptr float, float* %arg6, i64 %329
  %389 = load float, float* %388
  %390 = getelementptr float, float* %arg6, i64 %337
  %391 = load float, float* %390
  %392 = getelementptr float, float* %arg6, i64 %345
  %393 = load float, float* %392
  %394 = getelementptr float, float* %arg6, i64 %353
  %395 = load float, float* %394
  %396 = getelementptr float, float* %arg6, i64 %361
  %397 = load float, float* %396
  %398 = alloca float, i32 18
  %399 = getelementptr float, float* %398, i32 0
  store float %363, float* %399
  %400 = getelementptr float, float* %398, i32 1
  store float %365, float* %400
  %401 = getelementptr float, float* %398, i32 2
  store float %367, float* %401
  %402 = getelementptr float, float* %398, i32 3
  store float %369, float* %402
  %403 = getelementptr float, float* %398, i32 4
  store float %371, float* %403
  %404 = getelementptr float, float* %398, i32 5
  store float %373, float* %404
  %405 = getelementptr float, float* %398, i32 6
  store float %375, float* %405
  %406 = getelementptr float, float* %398, i32 7
  store float %377, float* %406
  %407 = getelementptr float, float* %398, i32 8
  store float %379, float* %407
  %408 = getelementptr float, float* %398, i32 9
  store float %381, float* %408
  %409 = getelementptr float, float* %398, i32 10
  store float %383, float* %409
  %410 = getelementptr float, float* %398, i32 11
  store float %385, float* %410
  %411 = getelementptr float, float* %398, i32 12
  store float %387, float* %411
  %412 = getelementptr float, float* %398, i32 13
  store float %389, float* %412
  %413 = getelementptr float, float* %398, i32 14
  store float %391, float* %413
  %414 = getelementptr float, float* %398, i32 15
  store float %393, float* %414
  %415 = getelementptr float, float* %398, i32 16
  store float %395, float* %415
  %416 = getelementptr float, float* %398, i32 17
  store float %397, float* %416
  %417 = mul i64 %arg4, 3
  %418 = add nsw i64 %417, %arg5
  %419 = add nsw i64 0, %418
  %420 = mul i64 %419, 2
  %421 = add nsw i64 %420, 0
  %422 = add nsw i64 0, %418
  %423 = mul i64 %422, 2
  %424 = add nsw i64 %423, 1
  %425 = getelementptr float, float* %398, i64 %421
  %426 = load float, float* %425
  %427 = getelementptr float, float* %398, i64 %424
  %428 = load float, float* %427
  %429 = fadd float %426, %215
  %430 = mul i64 %441, 1
  %431 = add nsw i64 %430, 0
  %432 = mul i64 %431, 1
  %433 = add nsw i64 %432, 0
  %434 = mul i64 %433, 1
  %435 = add nsw i64 %434, 0
  %436 = mul i64 %435, 8
  %437 = add nsw i64 %436, %6
  %438 = getelementptr float, float* %arg0, i64 %437
  store float %429, float* %438
  br label %L7

L4:                                               ; preds = %L7
  %439 = add nsw i64 %441, 1
  %440 = icmp sge i64 %439, %5
  br i1 %440, label %L6, label %L5

L5:                                               ; preds = %L4, %L2
  %441 = phi i64 [ %439, %L4 ], [ %4, %L2 ]
  br label %L3

L6:                                               ; preds = %L4
  ret void

L7:                                               ; preds = %L3
  %442 = add nsw i64 %6, 1
  %443 = icmp sge i64 %442, 8
  br i1 %443, label %L4, label %L3
}
-------------- next part --------------
; ModuleID = 'f.ll'
source_filename = "f.ll"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

define void @main(i64 %lo, i64 %hi, i64 %myId, i1 %ordered, i64 %start, float* noalias align 64 %arg0, i64 %arg1, i64 %arg2, float* noalias align 64 %arg3, i64 %arg4, i64 %arg5, float* noalias align 64 %arg6) {
entrypoint:
  br i1 %ordered, label %L0, label %L1

L0:                                               ; preds = %entrypoint
  %0 = add nsw i64 %lo, %start
  %1 = add nsw i64 %hi, %start
  br label %L2

L1:                                               ; preds = %entrypoint
  br label %L2

L2:                                               ; preds = %L1, %L0
  %2 = phi i64 [ %lo, %L1 ], [ %0, %L0 ]
  %3 = phi i64 [ %hi, %L1 ], [ %1, %L0 ]
  %4 = sdiv i64 %2, 8
  %5 = sdiv i64 %3, 8
  %6 = mul i64 %arg1, 3
  %7 = add nsw i64 %6, %arg2
  %8 = shl i64 %7, 1
  %9 = mul i64 %arg4, 3
  %10 = add nsw i64 %9, %arg5
  %11 = shl i64 %10, 1
  br label %L5

L3:                                               ; preds = %L3, %L5
  %12 = phi i64 [ %218, %L3 ], [ 0, %L5 ]
  %13 = add nsw i64 %223, %12
  %14 = add nsw i64 %225, %12
  %15 = add nsw i64 %227, %12
  %16 = add nsw i64 %229, %12
  %17 = add nsw i64 %231, %12
  %18 = add nsw i64 %233, %12
  %19 = add nsw i64 %235, %12
  %20 = add nsw i64 %237, %12
  %21 = add nsw i64 %239, %12
  %22 = add nsw i64 %241, %12
  %23 = add nsw i64 %243, %12
  %24 = add nsw i64 %245, %12
  %25 = add nsw i64 %247, %12
  %26 = add nsw i64 %249, %12
  %27 = add nsw i64 %251, %12
  %28 = add nsw i64 %253, %12
  %29 = add nsw i64 %255, %12
  %30 = add nsw i64 %257, %12
  %31 = getelementptr float, float* %arg3, i64 %13
  %32 = bitcast float* %31 to i32*
  %33 = load i32, i32* %32, align 4
  %34 = getelementptr float, float* %arg3, i64 %14
  %35 = bitcast float* %34 to i32*
  %36 = load i32, i32* %35, align 4
  %37 = getelementptr float, float* %arg3, i64 %15
  %38 = bitcast float* %37 to i32*
  %39 = load i32, i32* %38, align 4
  %40 = getelementptr float, float* %arg3, i64 %16
  %41 = bitcast float* %40 to i32*
  %42 = load i32, i32* %41, align 4
  %43 = getelementptr float, float* %arg3, i64 %17
  %44 = bitcast float* %43 to i32*
  %45 = load i32, i32* %44, align 4
  %46 = getelementptr float, float* %arg3, i64 %18
  %47 = bitcast float* %46 to i32*
  %48 = load i32, i32* %47, align 4
  %49 = getelementptr float, float* %arg3, i64 %19
  %50 = bitcast float* %49 to i32*
  %51 = load i32, i32* %50, align 4
  %52 = getelementptr float, float* %arg3, i64 %20
  %53 = bitcast float* %52 to i32*
  %54 = load i32, i32* %53, align 4
  %55 = getelementptr float, float* %arg3, i64 %21
  %56 = bitcast float* %55 to i32*
  %57 = load i32, i32* %56, align 4
  %58 = getelementptr float, float* %arg3, i64 %22
  %59 = bitcast float* %58 to i32*
  %60 = load i32, i32* %59, align 4
  %61 = getelementptr float, float* %arg3, i64 %23
  %62 = bitcast float* %61 to i32*
  %63 = load i32, i32* %62, align 4
  %64 = getelementptr float, float* %arg3, i64 %24
  %65 = bitcast float* %64 to i32*
  %66 = load i32, i32* %65, align 4
  %67 = getelementptr float, float* %arg3, i64 %25
  %68 = bitcast float* %67 to i32*
  %69 = load i32, i32* %68, align 4
  %70 = getelementptr float, float* %arg3, i64 %26
  %71 = bitcast float* %70 to i32*
  %72 = load i32, i32* %71, align 4
  %73 = getelementptr float, float* %arg3, i64 %27
  %74 = bitcast float* %73 to i32*
  %75 = load i32, i32* %74, align 4
  %76 = getelementptr float, float* %arg3, i64 %28
  %77 = bitcast float* %76 to i32*
  %78 = load i32, i32* %77, align 4
  %79 = getelementptr float, float* %arg3, i64 %29
  %80 = bitcast float* %79 to i32*
  %81 = load i32, i32* %80, align 4
  %82 = getelementptr float, float* %arg3, i64 %30
  %83 = bitcast float* %82 to i32*
  %84 = load i32, i32* %83, align 4
  %85 = alloca [18 x float], align 4
  %86 = bitcast [18 x float]* %85 to i32*
  store i32 %33, i32* %86, align 4
  %87 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 1
  %88 = bitcast float* %87 to i32*
  store i32 %36, i32* %88, align 4
  %89 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 2
  %90 = bitcast float* %89 to i32*
  store i32 %39, i32* %90, align 4
  %91 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 3
  %92 = bitcast float* %91 to i32*
  store i32 %42, i32* %92, align 4
  %93 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 4
  %94 = bitcast float* %93 to i32*
  store i32 %45, i32* %94, align 4
  %95 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 5
  %96 = bitcast float* %95 to i32*
  store i32 %48, i32* %96, align 4
  %97 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 6
  %98 = bitcast float* %97 to i32*
  store i32 %51, i32* %98, align 4
  %99 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 7
  %100 = bitcast float* %99 to i32*
  store i32 %54, i32* %100, align 4
  %101 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 8
  %102 = bitcast float* %101 to i32*
  store i32 %57, i32* %102, align 4
  %103 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 9
  %104 = bitcast float* %103 to i32*
  store i32 %60, i32* %104, align 4
  %105 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 10
  %106 = bitcast float* %105 to i32*
  store i32 %63, i32* %106, align 4
  %107 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 11
  %108 = bitcast float* %107 to i32*
  store i32 %66, i32* %108, align 4
  %109 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 12
  %110 = bitcast float* %109 to i32*
  store i32 %69, i32* %110, align 4
  %111 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 13
  %112 = bitcast float* %111 to i32*
  store i32 %72, i32* %112, align 4
  %113 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 14
  %114 = bitcast float* %113 to i32*
  store i32 %75, i32* %114, align 4
  %115 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 15
  %116 = bitcast float* %115 to i32*
  store i32 %78, i32* %116, align 4
  %117 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 16
  %118 = bitcast float* %117 to i32*
  store i32 %81, i32* %118, align 4
  %119 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 17
  %120 = bitcast float* %119 to i32*
  store i32 %84, i32* %120, align 4
  %121 = getelementptr [18 x float], [18 x float]* %85, i64 0, i64 %8
  %122 = load float, float* %121, align 4
  %123 = getelementptr float, float* %arg6, i64 %13
  %124 = bitcast float* %123 to i32*
  %125 = load i32, i32* %124, align 4
  %126 = getelementptr float, float* %arg6, i64 %14
  %127 = bitcast float* %126 to i32*
  %128 = load i32, i32* %127, align 4
  %129 = getelementptr float, float* %arg6, i64 %15
  %130 = bitcast float* %129 to i32*
  %131 = load i32, i32* %130, align 4
  %132 = getelementptr float, float* %arg6, i64 %16
  %133 = bitcast float* %132 to i32*
  %134 = load i32, i32* %133, align 4
  %135 = getelementptr float, float* %arg6, i64 %17
  %136 = bitcast float* %135 to i32*
  %137 = load i32, i32* %136, align 4
  %138 = getelementptr float, float* %arg6, i64 %18
  %139 = bitcast float* %138 to i32*
  %140 = load i32, i32* %139, align 4
  %141 = getelementptr float, float* %arg6, i64 %19
  %142 = bitcast float* %141 to i32*
  %143 = load i32, i32* %142, align 4
  %144 = getelementptr float, float* %arg6, i64 %20
  %145 = bitcast float* %144 to i32*
  %146 = load i32, i32* %145, align 4
  %147 = getelementptr float, float* %arg6, i64 %21
  %148 = bitcast float* %147 to i32*
  %149 = load i32, i32* %148, align 4
  %150 = getelementptr float, float* %arg6, i64 %22
  %151 = bitcast float* %150 to i32*
  %152 = load i32, i32* %151, align 4
  %153 = getelementptr float, float* %arg6, i64 %23
  %154 = bitcast float* %153 to i32*
  %155 = load i32, i32* %154, align 4
  %156 = getelementptr float, float* %arg6, i64 %24
  %157 = bitcast float* %156 to i32*
  %158 = load i32, i32* %157, align 4
  %159 = getelementptr float, float* %arg6, i64 %25
  %160 = bitcast float* %159 to i32*
  %161 = load i32, i32* %160, align 4
  %162 = getelementptr float, float* %arg6, i64 %26
  %163 = bitcast float* %162 to i32*
  %164 = load i32, i32* %163, align 4
  %165 = getelementptr float, float* %arg6, i64 %27
  %166 = bitcast float* %165 to i32*
  %167 = load i32, i32* %166, align 4
  %168 = getelementptr float, float* %arg6, i64 %28
  %169 = bitcast float* %168 to i32*
  %170 = load i32, i32* %169, align 4
  %171 = getelementptr float, float* %arg6, i64 %29
  %172 = bitcast float* %171 to i32*
  %173 = load i32, i32* %172, align 4
  %174 = getelementptr float, float* %arg6, i64 %30
  %175 = bitcast float* %174 to i32*
  %176 = load i32, i32* %175, align 4
  %177 = alloca [18 x float], align 4
  %178 = bitcast [18 x float]* %177 to i32*
  store i32 %125, i32* %178, align 4
  %179 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 1
  %180 = bitcast float* %179 to i32*
  store i32 %128, i32* %180, align 4
  %181 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 2
  %182 = bitcast float* %181 to i32*
  store i32 %131, i32* %182, align 4
  %183 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 3
  %184 = bitcast float* %183 to i32*
  store i32 %134, i32* %184, align 4
  %185 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 4
  %186 = bitcast float* %185 to i32*
  store i32 %137, i32* %186, align 4
  %187 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 5
  %188 = bitcast float* %187 to i32*
  store i32 %140, i32* %188, align 4
  %189 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 6
  %190 = bitcast float* %189 to i32*
  store i32 %143, i32* %190, align 4
  %191 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 7
  %192 = bitcast float* %191 to i32*
  store i32 %146, i32* %192, align 4
  %193 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 8
  %194 = bitcast float* %193 to i32*
  store i32 %149, i32* %194, align 4
  %195 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 9
  %196 = bitcast float* %195 to i32*
  store i32 %152, i32* %196, align 4
  %197 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 10
  %198 = bitcast float* %197 to i32*
  store i32 %155, i32* %198, align 4
  %199 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 11
  %200 = bitcast float* %199 to i32*
  store i32 %158, i32* %200, align 4
  %201 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 12
  %202 = bitcast float* %201 to i32*
  store i32 %161, i32* %202, align 4
  %203 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 13
  %204 = bitcast float* %203 to i32*
  store i32 %164, i32* %204, align 4
  %205 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 14
  %206 = bitcast float* %205 to i32*
  store i32 %167, i32* %206, align 4
  %207 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 15
  %208 = bitcast float* %207 to i32*
  store i32 %170, i32* %208, align 4
  %209 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 16
  %210 = bitcast float* %209 to i32*
  store i32 %173, i32* %210, align 4
  %211 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 17
  %212 = bitcast float* %211 to i32*
  store i32 %176, i32* %212, align 4
  %213 = getelementptr [18 x float], [18 x float]* %177, i64 0, i64 %11
  %214 = load float, float* %213, align 4
  %215 = fadd float %214, %122
  %216 = add nsw i64 %258, %12
  %217 = getelementptr float, float* %arg0, i64 %216
  store float %215, float* %217, align 4
  %218 = add nsw i64 %12, 1
  %219 = icmp sgt i64 %12, 6
  br i1 %219, label %L4, label %L3

L4:                                               ; preds = %L3
  %220 = add nsw i64 %222, 1
  %221 = icmp slt i64 %220, %5
  br i1 %221, label %L5, label %L6

L5:                                               ; preds = %L4, %L2
  %222 = phi i64 [ %220, %L4 ], [ %4, %L2 ]
  %223 = mul i64 %222, 144
  %224 = mul i64 %222, 144
  %225 = or i64 %224, 8
  %226 = mul i64 %222, 144
  %227 = add i64 %226, 16
  %228 = mul i64 %222, 144
  %229 = add i64 %228, 24
  %230 = mul i64 %222, 144
  %231 = add i64 %230, 32
  %232 = mul i64 %222, 144
  %233 = add i64 %232, 40
  %234 = mul i64 %222, 144
  %235 = add i64 %234, 48
  %236 = mul i64 %222, 144
  %237 = add i64 %236, 56
  %238 = mul i64 %222, 144
  %239 = add i64 %238, 64
  %240 = mul i64 %222, 144
  %241 = add i64 %240, 72
  %242 = mul i64 %222, 144
  %243 = add i64 %242, 80
  %244 = mul i64 %222, 144
  %245 = add i64 %244, 88
  %246 = mul i64 %222, 144
  %247 = add i64 %246, 96
  %248 = mul i64 %222, 144
  %249 = add i64 %248, 104
  %250 = mul i64 %222, 144
  %251 = add i64 %250, 112
  %252 = mul i64 %222, 144
  %253 = add i64 %252, 120
  %254 = mul i64 %222, 144
  %255 = add i64 %254, 128
  %256 = mul i64 %222, 144
  %257 = add i64 %256, 136
  %258 = shl i64 %222, 3
  br label %L3

L6:                                               ; preds = %L4
  ret void
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cc
Type: text/x-c++src
Size: 5149 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160914/8fd29d1c/attachment.cc>


More information about the llvm-dev mailing list