[all-commits] [llvm/llvm-project] 89a5d8: [SCCP] add a code comment about sitofp -> uitofp; NFC

Sanjay Patel via All-commits all-commits at lists.llvm.org
Fri Sep 30 14:26:30 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 89a5d804c1c2e35dda3c39a6f0f5006a296c75ee
      https://github.com/llvm/llvm-project/commit/89a5d804c1c2e35dda3c39a6f0f5006a296c75ee
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-09-30 (Fri, 30 Sep 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SCCP.cpp

  Log Message:
  -----------
  [SCCP] add a code comment about sitofp -> uitofp; NFC

D134975 would have added this fold, but we decided it's
not worth doing without some evidence of benefit.


  Commit: 20530704439666366b7f37e946c6f676ef0cc8c3
      https://github.com/llvm/llvm-project/commit/20530704439666366b7f37e946c6f676ef0cc8c3
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-09-30 (Fri, 30 Sep 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SCCP.cpp

  Log Message:
  -----------
  [SCCP] remove unnecessary check for constant when folding sext->zext

I'm not sure how to test this because we seem to constant-fold
all examples already. We changed this code to use the common
isNonNegative() helper, so it should not be necessary to avoid
a constant. This makes the code uniform for all transforms.


Compare: https://github.com/llvm/llvm-project/compare/ef843c827102...205307044396


More information about the All-commits mailing list