[PATCH] D38181: [x86] swap order of srl (and X, C1), C2 when it saves size

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 22 10:16:36 PDT 2017


craig.topper added inline comments.


================
Comment at: test/CodeGen/X86/urem-i8-constant.ll:10
 ; CHECK-NEXT:    shrl $12, %eax
+; CHECK-NEXT:    movzwl %ax, %eax
 ; CHECK-NEXT:    movb $37, %dl
----------------
craig.topper wrote:
> It's not immediately obvious to me how moving 0x7000 right by 12 bits turned into a mozwl.
Oh there's magic in SelectionDAGISel::CheckAndMask that I never knew about.


https://reviews.llvm.org/D38181





More information about the llvm-commits mailing list