[all-commits] [llvm/llvm-project] 83ed93: [InstCombine] add tests for fabs folds with more F...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Sat Dec 10 07:07:57 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 83ed93c0c387ca92d436e7bb3229712d3d4f665f
      https://github.com/llvm/llvm-project/commit/83ed93c0c387ca92d436e7bb3229712d3d4f665f
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-12-10 (Sat, 10 Dec 2022)

  Changed paths:
    M llvm/test/Transforms/InstCombine/fabs.ll
    M llvm/test/Transforms/InstCombine/fneg-fabs.ll
    M llvm/test/Transforms/InstCombine/fneg.ll

  Log Message:
  -----------
  [InstCombine] add tests for fabs folds with more FMF; NFC

The existing variants have "nsz", but that's not enough
to get fabs/fneg semantics right with a NAN input, so
I duplicated those with "nnan" tacked on. See discussion
in issue #59279.


  Commit: eec18b521ad6b3ef2c93542b09a7a4d03bab8176
      https://github.com/llvm/llvm-project/commit/eec18b521ad6b3ef2c93542b09a7a4d03bab8176
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-12-10 (Sat, 10 Dec 2022)

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

  Log Message:
  -----------
  [InstCombine] reorder FP select folds

There was a code comment about detecting min/max, and we were already
doing that later.

The real motivation is hinted at by the new TODO comment. I'm hoping
to untangle some FMF ambiguity in follow-on patches. See discussion
in issue #59279.

There are enough unknowns in FMF handling that I can't say with
certainty that this change is NFC, but it doesn't cause any existing
regression tests to change.


Compare: https://github.com/llvm/llvm-project/compare/8136a0172b3c...eec18b521ad6


More information about the All-commits mailing list