[all-commits] [llvm/llvm-project] 6eeb03: [RISCV][NFC] Fix UBSan issue in ISel (#181422)

Sam Elliott via All-commits all-commits at lists.llvm.org
Fri Feb 13 14:26:46 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6eeb03b5a28d048701313c9ec4edf4fbbbc842bb
      https://github.com/llvm/llvm-project/commit/6eeb03b5a28d048701313c9ec4edf4fbbbc842bb
  Author: Sam Elliott <aelliott at qti.qualcomm.com>
  Date:   2026-02-13 (Fri, 13 Feb 2026)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
    M llvm/test/CodeGen/RISCV/add-imm64-to-sub.ll

  Log Message:
  -----------
  [RISCV][NFC] Fix UBSan issue in ISel (#181422)

If `int Imm` is `INT64_MIN`, then negating this value overflows, which
is undefined behaviour. This adds this case to the tests, and avoids
this case.

Co-authored-by: Sampath Vutkoori <svutkoor at qti.qualcomm.com>



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