[llvm] [X86] Support encoding/decoding and lowering for APX variant SHL/SHR/SAR/SHLD/SHRD (PR #78853)

Shengchen Kan via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 21 22:34:23 PST 2024


================
@@ -0,0 +1,530 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+ndd -verify-machineinstrs --show-mc-encoding | FileCheck %s
+
+define i8 @rol8m1(ptr %ptr) {
+; CHECK-LABEL: rol8m1:
+; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    rolb $1, (%rdi), %al # encoding: [0x62,0xf4,0x7c,0x18,0xc0,0x07,0x01]
----------------
KanRobert wrote:

Yes, the encoding is correct b/c the opcode here is `ROL_8mi`_ND  instead of `ROL_8m1`. It will be optimized to` m1_ND` after it's added to encoding optimization list.

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


More information about the llvm-commits mailing list