1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00
Michael Liao 7baf13a5a7 [TTI] Fix cast cost on vector types.
- Only split vector types when both src and dst types are splittable.
2019-11-13 13:54:07 -05:00

22 lines
436 B
LLVM

; RUN: opt -licm -mtriple=amdgcn -S -o - %s | FileCheck %s
; CHECK-LABEL: foo
; CHECK: ret
define void @foo(i8* %d, <1 x i32>* %s, i32 %idx) {
entry:
br label %for.body
for.body:
%v0 = load <1 x i32>, <1 x i32>* %s
%v1 = bitcast <1 x i32> %v0 to <4 x i8>
br label %for.cond
for.cond:
%e0 = extractelement <4 x i8> %v1, i32 %idx
store i8 %e0, i8* %d
br i1 false, label %for.exit, label %for.body
for.exit:
ret void
}