[all-commits] [llvm/llvm-project] e009fa: [PowerPC] Remove UB from PPCInstrInfo when handlin...

Nemanja Ivanovic via All-commits all-commits at lists.llvm.org
Wed Mar 18 11:41:40 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e009fad342cedb8ed3ddc7c4c6e21d6d965abbbc
      https://github.com/llvm/llvm-project/commit/e009fad342cedb8ed3ddc7c4c6e21d6d965abbbc
  Author: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>
  Date:   2020-03-18 (Wed, 18 Mar 2020)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
    M llvm/test/CodeGen/PowerPC/convert-rr-to-ri-instrs.mir

  Log Message:
  -----------
  [PowerPC] Remove UB from PPCInstrInfo when handling rotates fed by constants

As pointed out in https://bugs.llvm.org/show_bug.cgi?id=45232 this code can
end up shifting a 64-bit unsigned value left by 64 bits. Althought this works
as expected on some platforms it is definitely UB. This patch removes the UB
and adds the associated test case.

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




More information about the All-commits mailing list