[all-commits] [llvm/llvm-project] 8f966c: [SelectionDAG] Use int64_t to store the integer po...

KanRobert via All-commits all-commits at lists.llvm.org
Mon May 1 23:09:15 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8f966cedea594d9a91e585e88a80a42c04049e6c
      https://github.com/llvm/llvm-project/commit/8f966cedea594d9a91e585e88a80a42c04049e6c
  Author: Shengchen Kan <shengchen.kan at intel.com>
  Date:   2023-05-02 (Tue, 02 May 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    A llvm/test/CodeGen/X86/powi-int32min.ll

  Log Message:
  -----------
  [SelectionDAG] Use int64_t to store the integer power of llvm.powi

https://llvm.org/docs/LangRef.html#llvm-powi-intrinsic
The max length of the integer power of `llvm.powi` intrinsic is 32, and
the value can be negative. If we use `int32_t` to store this value, `-Val`
will underflow when it is `INT32_MIN`

The issue was reported in D149033.




More information about the All-commits mailing list