1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=hexagon -mcpu=hexagonv5 < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker%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*9880d681SAndroid Build Coastguard Worker%struct.list_head_s.B = type { %struct.list_head_s.B*, %struct.list_data_s.C* } 5*9880d681SAndroid Build Coastguard Worker%struct.list_data_s.C = type { i16, i16 } 6*9880d681SAndroid Build Coastguard Worker%struct.MAT_PARAMS_S.D = type { i32, i16*, i16*, i32* } 7*9880d681SAndroid Build Coastguard Worker%struct.CORE_PORTABLE_S.E = type { i8 } 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Worker; Test that we don't generate a zero extend in this case. Instead we generate 10*9880d681SAndroid Build Coastguard Worker; a single sign extend instead of two zero extends. 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: zxth 13*9880d681SAndroid Build Coastguard Worker 14*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind 15*9880d681SAndroid Build Coastguard Workerdefine void @core_bench_list(%struct.RESULTS_S.A* %res) #0 { 16*9880d681SAndroid Build Coastguard Workerentry: 17*9880d681SAndroid Build Coastguard Worker %seed3 = getelementptr inbounds %struct.RESULTS_S.A, %struct.RESULTS_S.A* %res, i32 0, i32 2 18*9880d681SAndroid Build Coastguard Worker %0 = load i16, i16* %seed3, align 2 19*9880d681SAndroid Build Coastguard Worker %cmp364 = icmp sgt i16 %0, 0 20*9880d681SAndroid Build Coastguard Worker br i1 %cmp364, label %for.body, label %while.body19.i160 21*9880d681SAndroid Build Coastguard Worker 22*9880d681SAndroid Build Coastguard Workerfor.body: 23*9880d681SAndroid Build Coastguard Worker %i.0370 = phi i16 [ %inc50, %if.then ], [ 0, %entry ] 24*9880d681SAndroid Build Coastguard Worker br i1 undef, label %if.then, label %while.body.i273 25*9880d681SAndroid Build Coastguard Worker 26*9880d681SAndroid Build Coastguard Workerwhile.body.i273: 27*9880d681SAndroid Build Coastguard Worker %tobool.i272 = icmp eq %struct.list_head_s.B* undef, null 28*9880d681SAndroid Build Coastguard Worker br i1 %tobool.i272, label %if.then, label %while.body.i273 29*9880d681SAndroid Build Coastguard Worker 30*9880d681SAndroid Build Coastguard Workerif.then: 31*9880d681SAndroid Build Coastguard Worker %inc50 = add i16 %i.0370, 1 32*9880d681SAndroid Build Coastguard Worker %exitcond = icmp eq i16 %inc50, %0 33*9880d681SAndroid Build Coastguard Worker br i1 %exitcond, label %while.body19.i160, label %for.body 34*9880d681SAndroid Build Coastguard Worker 35*9880d681SAndroid Build Coastguard Workerwhile.body19.i160: 36*9880d681SAndroid Build Coastguard Worker br label %while.body19.i160 37*9880d681SAndroid Build Coastguard Worker} 38*9880d681SAndroid Build Coastguard Worker 39*9880d681SAndroid Build Coastguard Workerattributes #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*9880d681SAndroid Build Coastguard Worker 41