Backend: Add optimization for negative modifier

Graphics / Beignet - rander [intel.com] - 9 June 2017 08:02 EDT

LLVM transform Mad(a, -b, c) to Add b, -b, 0 Mad val, a, b, c

pow(a,-b) and other buildin math function to the same instruction sequence like above

for Gen support negtive modifier, mad(a, -b, c) is native suppoted. Do it just like a: mov b, -b, so it is a Mov operation like LocalCopyPropagation

f805337 Backend: Add optimization for negative modifier
.../src/backend/gen_insn_selection_optimize.cpp | 32 +++++++++++++++++++---
1 file changed, 28 insertions(+), 4 deletions(-)

Upstream: cgit.freedesktop.org


  • Share