[PATCH] D154496: InstCombine: Fold ldexp(ldexp(x, a), b) -> ldexp(x,  a + b)
    Matt Arsenault via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jul  5 04:47:05 PDT 2023
    
    
  
arsenm created this revision.
arsenm added reviewers: jcranmer-intel, foad, kpn, sepavloff, andrew.w.kaylor.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
The problem here is overflow or underflow which would have occurred in
the inner operation, which the exponent offsetting avoids. We can do
this if we know the two exponents are in the same direction, or
reassoc flags allow unsafe reassociates.
https://reviews.llvm.org/D154496
Files:
  llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  llvm/test/Transforms/InstCombine/ldexp.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154496.537296.patch
Type: text/x-patch
Size: 9275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230705/97e088ba/attachment.bin>
    
    
More information about the llvm-commits
mailing list