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

Nemanja Ivanovic <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #5 from Nemanja Ivanovic <[email protected]> ---
Proposed fix in https://reviews.llvm.org/D77542

Please note that this won't give you optimal codegen. Namely, we will always
use zero as the index and compute the address into the base register. However,
it will at least generate correct code.

We can revisit optimizing codegen in the future. In the meantime, you could
change something like:
void dcbz_w_offset(void* addr, int offset)
{
    asm volatile ("dcbz %y0" :: "Z"(*(unsigned char*)(addr + offset)) :
"memory");
}

into:
void dcbz_w_offset(void* addr, int offset)
{
  asm volatile ("dcbz %1, %0" :: "b"((unsigned char*)addr), "r"(offset) :
"memory");
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to