[all-commits] [llvm/llvm-project] 5a5a80: [BasicAA] Retain shl nowrap flags in GetLinearExpr...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Sat Mar 27 04:28:58 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5a5a8088cc8d3f9fdca8c959dd3e48da13324aab
https://github.com/llvm/llvm-project/commit/5a5a8088cc8d3f9fdca8c959dd3e48da13324aab
Author: Nikita Popov <nikita.ppv at gmail.com>
Date: 2021-03-27 (Sat, 27 Mar 2021)
Changed paths:
M llvm/lib/Analysis/BasicAliasAnalysis.cpp
M llvm/test/Analysis/BasicAA/zext.ll
Log Message:
-----------
[BasicAA] Retain shl nowrap flags in GetLinearExpression()
Nowrap flags between mul and shl differ in that mul nsw allows
multiplication of 1 * INT_MIN, while shl nsw does not. This means
that it is always fine to transfer shl nowrap flags to muls, but
not necessarily the other way around. In this case the NUW/NSW
results refer to mul/add operations, so it's fine to retain the
flags from the shl.
More information about the All-commits
mailing list