[llvm] [AMDGPU][GlobalISel] Combine (or s64, zext(s32)) (PR #151519)
Mirko BrkuĊĦanin via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 4 05:32:30 PDT 2025
================
@@ -151,6 +151,19 @@ def zext_of_shift_amount_combines : GICombineGroup<[
canonicalize_zext_lshr, canonicalize_zext_ashr, canonicalize_zext_shl
]>;
+// (or i64:x, (zext i32:y)) -> i64:(merge (or lo_32(x), i32:y), hi_32(x))
+// (or (zext i32:y), i64:x) -> i64:(merge (or lo_32(x), i32:y), hi_32(x))
+def or_s64_zext_s32_frag : GICombinePatFrag<(outs root:$dst), (ins $src_s64, $src_s32),
+ [ (pattern (G_OR $dst, i64:$src_s64, i64:$zext_val), (G_ZEXT i64:$zext_val, i32:$src_s32)),
+ (pattern (G_OR $dst, i64:$zext_val, i64:$src_s64), (G_ZEXT i64:$zext_val, i32:$src_s32))]>;
----------------
mbrkusanin wrote:
Apparently they do not.
https://github.com/llvm/llvm-project/pull/151519
More information about the llvm-commits
mailing list