[PATCH] D75157: [DAGCombine] Perform the fold of A - (-B) -> A + B only when it is cheaper

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 07:24:30 PST 2020


arsenm added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/fmuladd.f16.ll:198
 ; GCN: {{buffer|flat|global}}_load_ushort [[R2:v[0-9]+]],
-; VI-FLUSH: v_mac_f16_e32 [[R2]], 2.0, [[R1]]
+; VI-FLUSH: v_mad_f16 [[R2]], -[[R1]], -2.0, [[R2]]
 ; VI-FLUSH: flat_store_short v{{\[[0-9]+:[0-9]+\]}}, [[R2]]
----------------
This is a regression. The negate should have been pulled out since it folds into the user for smaller code size


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75157/new/

https://reviews.llvm.org/D75157





More information about the llvm-commits mailing list