llvm-project/llvm/lib/Transforms/AggressiveInstCombine
Vigneshwar Jayakumar 616af49f06
[AggressiveInstCombine] Allow load folding for root inst with multiple uses. (#176101)
The load folding optimization was very conservative by requiring the
root OR instruction to have a single use. This prevented optimization
when to fold loads when only the root had multiple uses.

For example:
  %val = or i32 ...     ; Assembles 4 bytes to i32
  %use1 = call @foo(%val)
  %use2 = call @bar(%val)
2026-01-16 13:19:50 -06:00
..