[PATCH] D105424: [DAGCombiner] Pre-commit test to demonstrate mulhi const folding
David Stuttard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 5 03:35:25 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4b125b23ba95: [DAGCombiner] Pre-commit test to demonstrate mulhi const folding (authored by dstuttard).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105424/new/
https://reviews.llvm.org/D105424
Files:
llvm/test/CodeGen/AMDGPU/udiv.ll
Index: llvm/test/CodeGen/AMDGPU/udiv.ll
===================================================================
--- llvm/test/CodeGen/AMDGPU/udiv.ll
+++ llvm/test/CodeGen/AMDGPU/udiv.ll
@@ -200,3 +200,18 @@
store i8 %tmp6, i8 addrspace(1)* null, align 1
ret void
}
+
+define i64 @v_test_udiv64_mulhi_fold(i64 %arg) {
+; GCN-LABEL: v_test_udiv64_mulhi_fold
+; GFX1030: s_mov_b32 [[VAL1:s[0-9]+]], 0xa9000000
+; GFX1030: s_brev_b32 [[VAL2:s[0-9]+]], 6
+; GFX1030: s_movk_i32 [[VAL3:s[0-9]+]], 0x500
+; GFX1030: s_mul_hi_u32 s7, [[VAL1]], [[VAL2]]
+; GFX1030: s_mov_b32 [[VAL4:s[0-9]+]], 0xa7c5
+; GFX1030: s_mul_hi_u32 s8, [[VAL1]], [[VAL3]]
+; GFX1030: s_mul_hi_u32 s5, [[VAL4]], [[VAL2]]
+; GFX1030: s_mul_hi_u32 s6, [[VAL4]], [[VAL3]]
+; GFX1030: v_add_co_u32 v{{[0-9]+}}, s{{[0-9]+}}, s{{[0-9]+}}, s{{[0-9]+}}
+ %d = udiv i64 %arg, 100000
+ ret i64 %d
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105424.356466.patch
Type: text/x-patch
Size: 862 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210705/e75f3ad0/attachment.bin>
More information about the llvm-commits
mailing list