[llvm] [SelectionDAG] Propogate Disjoint flag. (PR #88370)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 12 19:27:30 PDT 2024


================
@@ -0,0 +1,17 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=x86_64 %s -start-before=x86-isel -o - | FileCheck %s
+
+define void @add_shl_or_disjoint(i32 %x, ptr addrspace(1) %o) {
+; CHECK-LABEL: add_shl_or_disjoint:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    # kill: def $edi killed $edi def $rdi
+; CHECK-NEXT:    leal 165036822(,%rdi,4), %eax
+; CHECK-NEXT:    movl %eax, (%rsi)
+; CHECK-NEXT:    retq
+  %or = or disjoint i32 %x, 4027584529
+  %shl = shl i32 %or, 2
+  %add = add i32 %shl, 1234567890
+  store i32 %add, ptr addrspace(1) %o
----------------
fengfeng09 wrote:

ok

https://github.com/llvm/llvm-project/pull/88370


More information about the llvm-commits mailing list