aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2022-05-17 10:21:02 -0400
committerSanjay Patel <spatel@rotateright.com>2022-05-17 11:10:28 -0400
commitf31d39c42c0e17ff9b9f65cae797ba5d66e78ec7 (patch)
tree0105b3da2eba751ea73f7ea6e411303db1c358c0 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentf7709a059ac0ef1edaa2dc83321a4d972933e975 (diff)
downloadllvm-f31d39c42c0e17ff9b9f65cae797ba5d66e78ec7.zip
llvm-f31d39c42c0e17ff9b9f65cae797ba5d66e78ec7.tar.gz
llvm-f31d39c42c0e17ff9b9f65cae797ba5d66e78ec7.tar.bz2
[InstCombine] remove cast-of-signbit to shift transform
The transform was wrong in 3 ways: 1. It created an extra instruction when the source and dest types don't match. 2. It did not account for an extra use of the icmp, so could create 2 extra insts. 3. It favored bit hacks over icmp (icmp generally has better analysis). This fixes #54692 (modeled by the PhaseOrdering tests). This is a minimal step to fix the bug, but we should likely invert this and the sibling transform for the "is negative" pattern too. The backend should be able to invert this back to a shift if that leads to better codegen. This is a reduced try of 3794cc0e9964 - that was reverted because it could cause infinite loops by conflicting with the related transforms in this block that create shifts.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions