[PATCH] D101944: [X86][Codegen] Shift amount mod: sh? i64 x, (32-y) --> sh? i64 x, -(y+32)

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 11 06:25:49 PDT 2021


lebedev.ri added inline comments.


================
Comment at: llvm/test/CodeGen/X86/64-bit-shift-by-32-minus-y.ll:293-300
 ; X64-BMI2-LABEL: t5_cse:
 ; X64-BMI2:       # %bb.0:
-; X64-BMI2-NEXT:    leaq 32(%rsi), %rax
-; X64-BMI2-NEXT:    movq %rax, (%rdx)
-; X64-BMI2-NEXT:    movb $32, %al
-; X64-BMI2-NEXT:    subb %sil, %al
-; X64-BMI2-NEXT:    shlxq %rax, %rdi, %rax
----------------
To reiterate, i'm most interested in this case, where we already computed the `x+32`, so we get that for free.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101944/new/

https://reviews.llvm.org/D101944



More information about the llvm-commits mailing list