aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Signposts.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2021-06-03 13:15:23 -0400
committerSanjay Patel <spatel@rotateright.com>2021-06-03 13:58:19 -0400
commitb865eead76577b031c6fae5e2490e7be0073f201 (patch)
tree23e058752ec4247671ce94af673e2b6185dd1a37 /llvm/lib/Support/Signposts.cpp
parent3e55f55048387a8efef01e445d46fc5cf100285d (diff)
downloadllvm-b865eead76577b031c6fae5e2490e7be0073f201.zip
llvm-b865eead76577b031c6fae5e2490e7be0073f201.tar.gz
llvm-b865eead76577b031c6fae5e2490e7be0073f201.tar.bz2
[InstCombine] eliminate sext and/or trunc if value has enough signbits
If we have enough signbits in a source value, we can skip an intermediate cast for a trunc+sext pair: https://alive2.llvm.org/ce/z/A_mQt- This is the original problem shown in: https://llvm.org/PR49543 There's a test that shows we transformed what used to be a pair of shifts, so that suggests we could add another ComputeNumSignBits fold starting from a shift. There does not appear to be any change in compile-time from the extra analysis: https://llvm-compile-time-tracker.com/compare.php?from=3d2c9069dcafd0cbb641841aa3dd6e851fb7d760&to=b9513cdf2419704c7bb0c3a02a9ca06aae13d902&stat=instructions Differential Revision: https://reviews.llvm.org/D103617
Diffstat (limited to 'llvm/lib/Support/Signposts.cpp')
0 files changed, 0 insertions, 0 deletions