[DAGCombiner][GlobalISel] Extract isFusedOp lambda, add FMA contraction test, fix missing isFPExtFoldable check
Extract the duplicated isFusedOp lambda in visitFADDForFMACombine and
visitFSUBForFMACombine into a shared static template function.
Add fma-multiple-uses-contraction.ll test file with baseline CHECK lines
for testing FMA contraction behavior when fmul has multiple uses.
This test will be updated in subsequent patches as contraction prevention
logic is added.
Fix a missing isFPExtFoldable check in GISel's
matchCombineFSubFpExtFMulToFMadOrFMA which could incorrectly fold
fsub(fpext(fmul)) into fma on targets where the fpext is not actually
foldable (e.g., gfx9-generic). This makes GISel consistent with SDAG,
which already checks isFPExtFoldable at all fpext fold sites.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Made-with: Cursor