aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/ModuleDependencyCollector.cpp
diff options
context:
space:
mode:
authorRoman Tereshin <rtereshin@apple.com>2018-05-09 21:43:30 +0000
committerRoman Tereshin <rtereshin@apple.com>2018-05-09 21:43:30 +0000
commit6d26638c905a796a194fd21482740c9ddc3be788 (patch)
tree83f01dad2e4684254dc231f7a29fa408820181a5 /clang/lib/Frontend/ModuleDependencyCollector.cpp
parent4fbf84c1732fca596ad1d6e96015e19760eb8a9b (diff)
downloadllvm-6d26638c905a796a194fd21482740c9ddc3be788.zip
llvm-6d26638c905a796a194fd21482740c9ddc3be788.tar.gz
llvm-6d26638c905a796a194fd21482740c9ddc3be788.tar.bz2
[GlobalISel][Legalizer] Widening the second src op of shifts bug fix
The second source operand of G_SHL, G_ASHR, and G_LSHR must preserve its value as a (small) unsigned integer, therefore its incorrect to widen it in any way but by zero extending it. G_SHL was using G_ANYEXT and G_ASHR - G_SEXT (which is correct for their destination and first source operands, but not the "number of bits to shift" operand). Generally, shifts aren't as similar to regular binary operations as it might seem, for instance, they aren't commutative nor associative and the second source operand usually requires a special treatment. Reviewers: bogner, javed.absar, aivchenk, rovka Reviewed By: bogner Subscribers: igorb, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D46413 llvm-svn: 331926
Diffstat (limited to 'clang/lib/Frontend/ModuleDependencyCollector.cpp')
0 files changed, 0 insertions, 0 deletions