[all-commits] [llvm/llvm-project] 7bee94: [InstCombine] form copysign from select of FP cons...

RotateRight via All-commits all-commits at lists.llvm.org
Mon Jan 20 07:53:38 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7bee94410ce265833695128dfad7fbd7a8eef6ba
      https://github.com/llvm/llvm-project/commit/7bee94410ce265833695128dfad7fbd7a8eef6ba
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-01-20 (Mon, 20 Jan 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/select.ll

  Log Message:
  -----------
  [InstCombine] form copysign from select of FP constants (PR44153)

This should be the last step needed to solve the problem in the
description of PR44153:
https://bugs.llvm.org/show_bug.cgi?id=44153

If we're casting an FP value to int, testing its signbit, and then
choosing between a value and its negated value, that's a
complicated way of saying "copysign":

(bitcast X) <  0 ? -TC :  TC --> copysign(TC,  X)

Differential Revision: https://reviews.llvm.org/D72643




More information about the All-commits mailing list