diff options
| author | Michael Liao <michael.hliao@gmail.com> | 2019-11-13 12:19:29 -0500 |
|---|---|---|
| committer | Michael Liao <michael.hliao@gmail.com> | 2019-11-13 13:54:07 -0500 |
| commit | 2bf9b9a5a3a4d3817e44d31579a6cd5d67907b2c (patch) | |
| tree | 1f305698f4121587f599cc8900951ef202c714ed /llvm/test | |
| parent | 1ca85b3d33a14394c9c11d68a40d038075d7e8ee (diff) | |
| download | bcm5719-llvm-2bf9b9a5a3a4d3817e44d31579a6cd5d67907b2c.tar.gz bcm5719-llvm-2bf9b9a5a3a4d3817e44d31579a6cd5d67907b2c.zip | |
[TTI] Fix cast cost on vector types.
- Only split vector types when both src and dst types are splittable.
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/LICM/AMDGPU/bitcast.ll | 21 | ||||
| -rw-r--r-- | llvm/test/Transforms/LICM/AMDGPU/lit.local.cfg | 2 |
2 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/Transforms/LICM/AMDGPU/bitcast.ll b/llvm/test/Transforms/LICM/AMDGPU/bitcast.ll new file mode 100644 index 00000000000..5f45465516b --- /dev/null +++ b/llvm/test/Transforms/LICM/AMDGPU/bitcast.ll @@ -0,0 +1,21 @@ +; 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 +} diff --git a/llvm/test/Transforms/LICM/AMDGPU/lit.local.cfg b/llvm/test/Transforms/LICM/AMDGPU/lit.local.cfg new file mode 100644 index 00000000000..2a665f06be7 --- /dev/null +++ b/llvm/test/Transforms/LICM/AMDGPU/lit.local.cfg @@ -0,0 +1,2 @@ +if not 'AMDGPU' in config.root.targets: + config.unsupported = True |

