[llvm-branch-commits] [llvm] cd7f737 - [AArch64][llvm] Fix encoding for `stshh` instruction (#189588)
Cullen Rhodes via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Apr 6 11:24:59 PDT 2026
Author: Jonathan Thackray
Date: 2026-04-06T18:24:51Z
New Revision: cd7f7379a016b4456a44c9e4f8e4dfd2ce0bb00a
URL: https://github.com/llvm/llvm-project/commit/cd7f7379a016b4456a44c9e4f8e4dfd2ce0bb00a
DIFF: https://github.com/llvm/llvm-project/commit/cd7f7379a016b4456a44c9e4f8e4dfd2ce0bb00a.diff
LOG: [AArch64][llvm] Fix encoding for `stshh` instruction (#189588)
The encoding for `stshh` was incorrect, and has been fixed. This
has been checked against the Arm ARM.
Added:
Modified:
llvm/lib/Target/AArch64/AArch64InstrFormats.td
llvm/test/MC/AArch64/armv9.6a-pcdphint.s
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64InstrFormats.td b/llvm/lib/Target/AArch64/AArch64InstrFormats.td
index 75adaf6602caa..ae6f84d9f4420 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrFormats.td
+++ b/llvm/lib/Target/AArch64/AArch64InstrFormats.td
@@ -1850,7 +1850,7 @@ class STSHHI
: SimpleSystemI<0, (ins phint_op:$policy), "stshh", "\t$policy", []>,
Sched<[WriteHint]> {
bits<3> policy;
- let Inst{20-12} = 0b000011001;
+ let Inst{20-12} = 0b000110010;
let Inst{11-8} = 0b0110;
let Inst{7-5} = policy;
}
diff --git a/llvm/test/MC/AArch64/armv9.6a-pcdphint.s b/llvm/test/MC/AArch64/armv9.6a-pcdphint.s
index 8394171740501..163785f7ec239 100644
--- a/llvm/test/MC/AArch64/armv9.6a-pcdphint.s
+++ b/llvm/test/MC/AArch64/armv9.6a-pcdphint.s
@@ -14,12 +14,12 @@
stshh keep
// CHECK-INST: stshh keep
-// CHECK-ENCODING: encoding: [0x1f,0x96,0x01,0xd5]
+// CHECK-ENCODING: encoding: [0x1f,0x26,0x03,0xd5]
// CHECK-ERROR: error: instruction requires: pcdphint
-// CHECK-UNKNOWN: d501961f msr S0_1_C9_C6_0, xzr
+// CHECK-UNKNOWN: d503261f hint #0x30
stshh strm
// CHECK-INST: stshh strm
-// CHECK-ENCODING: encoding: [0x3f,0x96,0x01,0xd5]
+// CHECK-ENCODING: encoding: [0x3f,0x26,0x03,0xd5]
// CHECK-ERROR: error: instruction requires: pcdphint
-// CHECK-UNKNOWN: d501963f msr S0_1_C9_C6_1, xzr
+// CHECK-UNKNOWN: d503263f hint #0x31
More information about the llvm-branch-commits
mailing list