Skip to content

Commit f4502da

Browse files
committed
[AMDGPU][RegBankCombiner] Add cast_of_cast and constant_fold_cast combines
We can add a bunch of exts/truncs during RBSelect, we should be able to fold them away afterwards.
1 parent ab1dcac commit f4502da

File tree

8 files changed

+768
-1164
lines changed

8 files changed

+768
-1164
lines changed

llvm/lib/Target/AMDGPU/AMDGPUCombine.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,5 +180,6 @@ def AMDGPURegBankCombiner : GICombiner<
180180
[unmerge_merge, unmerge_cst, unmerge_undef,
181181
zext_trunc_fold, int_minmax_to_med3, ptr_add_immed_chain,
182182
fp_minmax_to_clamp, fp_minmax_to_med3, fmed3_intrinsic_to_clamp,
183-
identity_combines, redundant_and]> {
183+
identity_combines, redundant_and, constant_fold_cast_op,
184+
cast_of_cast_combines]> {
184185
}

llvm/test/CodeGen/AMDGPU/GlobalISel/fshl.ll

Lines changed: 217 additions & 397 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)