[llvm] [X86] Fix the issue of creating index reg negations (PR #135632)

Feng Zou via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 15 08:32:44 PDT 2025


================
@@ -0,0 +1,71 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc %s -mtriple=x86_64-unknown -mattr=+ndd -verify-machineinstrs --show-mc-encoding -o - | FileCheck %s --check-prefix=NDD
+
+
+define void @neg_8bit_1(i1 %cmp) {
+; NDD-LABEL: neg_8bit_1:
+; NDD:       # %bb.0: # %entry
+; NDD-NEXT:    andb $1, %dil, %al # encoding: [0x62,0xf4,0x7c,0x18,0x80,0xe7,0x01]
+; NDD-NEXT:    movzbl 0, %ecx # encoding: [0x0f,0xb6,0x0c,0x25,0x00,0x00,0x00,0x00]
+; NDD-NEXT:    negb %al, %al # encoding: [0x62,0xf4,0x7c,0x18,0xf6,0xd8]
----------------
fzou1 wrote:

@phoebewang , thank you for your explanation.

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


More information about the llvm-commits mailing list