[all-commits] [llvm/llvm-project] b98917: [BOLT] Handle generation of compare and jump seque...

Rodrigo Rocha via All-commits all-commits at lists.llvm.org
Thu Apr 3 18:34:46 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b9891715af7ab055ccb7ad424aefe54c67d77988
      https://github.com/llvm/llvm-project/commit/b9891715af7ab055ccb7ad424aefe54c67d77988
  Author: Rodrigo Rocha <rcor at dcc.ufmg.br>
  Date:   2025-04-03 (Thu, 03 Apr 2025)

  Changed paths:
    M bolt/include/bolt/Core/MCPlusBuilder.h
    M bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
    M bolt/lib/Target/X86/X86MCPlusBuilder.cpp
    M bolt/unittests/Core/MCPlusBuilder.cpp

  Log Message:
  -----------
  [BOLT] Handle generation of compare and jump sequences (#131949)

This patch fixes the following two issues with the createCmpJE for
AArch64:
1. Avoids overwriting the value of the input register RegNo by use XZR
as the destination register.
   subs xzr, RegNo, #Imm
   which is equivalent to a simple
   cmp RegNo, #Imm
2. The immediate operand to the Bcc instruction must be EQ instead of
#Imm.

This patch also adds a new function for createCmpJNE and unit tests for
the both createCmpJE and createCmpJNE for X86 and AArch64.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list