[llvm-bugs] [Bug 47024] New: Use xor esi, esi instead of mov esi, 0

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 6 15:00:08 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47024

            Bug ID: 47024
           Summary: Use xor esi, esi instead of mov esi, 0
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: david.bolvansky at gmail.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, spatel+llvm at rotateright.com

struct data_t {
  char data[16];
};

void process3(data_t, data_t, data_t);

void test() {
  process3({1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
           {11, 12, 13, 14, 15, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10},
           {21, 22, 23, 24, 25, 20, 20, 20, 10, 20, 20, 20, 20, 20, 20, 11});
}

test():                               # @test()
        movabs  rdi, 21542142465
        movabs  rdx, 723401749922909195
        movabs  rcx, 723401728380766730
        movabs  r8, 1446803478303675925
        movabs  r9, 798285110420182026
        mov     esi, 0
        jmp     process3(data_t, data_t, data_t)          # TAILCALL


https://godbolt.org/z/n1hbv8

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200806/fef41fc6/attachment-0001.html>


More information about the llvm-bugs mailing list