1; RUN: opt -licm -mtriple=amdgcn -S -o - %s | FileCheck %s 2 3; CHECK-LABEL: foo 4; CHECK: ret 5define void @foo(i8* %d, <1 x i32>* %s, i32 %idx) { 6entry: 7 br label %for.body 8 9for.body: 10 %v0 = load <1 x i32>, <1 x i32>* %s 11 %v1 = bitcast <1 x i32> %v0 to <4 x i8> 12 br label %for.cond 13 14for.cond: 15 %e0 = extractelement <4 x i8> %v1, i32 %idx 16 store i8 %e0, i8* %d 17 br i1 false, label %for.exit, label %for.body 18 19for.exit: 20 ret void 21} 22