Krzysztof Parzyszek | 18484de | 2018-03-06 19:15:58 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=hexagon < %s | FileCheck %s |
Colin LeMahieu | ca8a82d | 2015-06-17 17:19:05 +0000 | [diff] [blame] | 2 | |
| 3 | %struct.RESULTS_S.A = type { i16, i16, i16, [4 x i8*], i32, i32, i32, %struct.list_head_s.B*, %struct.MAT_PARAMS_S.D, i16, i16, i16, i16, i16, %struct.CORE_PORTABLE_S.E } |
| 4 | %struct.list_head_s.B = type { %struct.list_head_s.B*, %struct.list_data_s.C* } |
| 5 | %struct.list_data_s.C = type { i16, i16 } |
| 6 | %struct.MAT_PARAMS_S.D = type { i32, i16*, i16*, i32* } |
| 7 | %struct.CORE_PORTABLE_S.E = type { i8 } |
| 8 | |
| 9 | ; Test that we don't generate a zero extend in this case. Instead we generate |
| 10 | ; a single sign extend instead of two zero extends. |
| 11 | |
| 12 | ; CHECK-NOT: zxth |
| 13 | |
| 14 | ; Function Attrs: nounwind |
| 15 | define void @core_bench_list(%struct.RESULTS_S.A* %res) #0 { |
| 16 | entry: |
| 17 | %seed3 = getelementptr inbounds %struct.RESULTS_S.A, %struct.RESULTS_S.A* %res, i32 0, i32 2 |
| 18 | %0 = load i16, i16* %seed3, align 2 |
| 19 | %cmp364 = icmp sgt i16 %0, 0 |
| 20 | br i1 %cmp364, label %for.body, label %while.body19.i160 |
| 21 | |
| 22 | for.body: |
| 23 | %i.0370 = phi i16 [ %inc50, %if.then ], [ 0, %entry ] |
| 24 | br i1 undef, label %if.then, label %while.body.i273 |
| 25 | |
| 26 | while.body.i273: |
| 27 | %tobool.i272 = icmp eq %struct.list_head_s.B* undef, null |
| 28 | br i1 %tobool.i272, label %if.then, label %while.body.i273 |
| 29 | |
| 30 | if.then: |
| 31 | %inc50 = add i16 %i.0370, 1 |
| 32 | %exitcond = icmp eq i16 %inc50, %0 |
| 33 | br i1 %exitcond, label %while.body19.i160, label %for.body |
| 34 | |
| 35 | while.body19.i160: |
| 36 | br label %while.body19.i160 |
| 37 | } |
| 38 | |
| 39 | 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"="false" } |
| 40 | |