[all-commits] [llvm/llvm-project] ad9dad: [BasicAA] Bail out earlier for invalid shift amount
Nikita Popov via All-commits
all-commits at lists.llvm.org
Sat Mar 27 04:42:18 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ad9dad93ff1237aed820bac8ec8e172e73af786d
https://github.com/llvm/llvm-project/commit/ad9dad93ff1237aed820bac8ec8e172e73af786d
Author: Nikita Popov <nikita.ppv at gmail.com>
Date: 2021-03-27 (Sat, 27 Mar 2021)
Changed paths:
M llvm/lib/Analysis/BasicAliasAnalysis.cpp
Log Message:
-----------
[BasicAA] Bail out earlier for invalid shift amount
Currently, we'd produce an incorrect decomposition, because we
already recursively called GetLinearExpression(), so the Scale=1,
Offset=0 will not necessarily be relative to the shl itself.
Now, this doesn't actually matter for functional correctness,
because such a shift is poison anyway, so its okay to return
an incorrect decomposition. It's still unnecessarily confusing
though, and we can easily avoid this by checking the bitwidth
earlier.
More information about the All-commits
mailing list