[all-commits] [llvm/llvm-project] 48b138: [InstCombine] Fix UB in align-assume check (#201985)

Sudharsan Veeravalli via All-commits all-commits at lists.llvm.org
Sat Jun 6 05:26:23 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 48b138533bd62599247d5b24e913ddfe0384cb2d
      https://github.com/llvm/llvm-project/commit/48b138533bd62599247d5b24e913ddfe0384cb2d
  Author: Sudharsan Veeravalli <svs at qti.qualcomm.com>
  Date:   2026-06-06 (Sat, 06 Jun 2026)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/assume-align.ll

  Log Message:
  -----------
  [InstCombine] Fix UB in align-assume check (#201985)

When we have a `NULL` pointer the `1ULL << computeKnownBits(RK.WasOn,
II).countMinTrailingZeros()` check becomes `1ULL << 64` which is UB.

We hit the following error in our downstream sanitizer builder: 

> llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp: runtime error:
shift exponent 64 is too large for 64-bit type 'unsigned long long'

Tests were generated using an AI.



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