[all-commits] [llvm/llvm-project] 1f60c8: [IR] Replace calls to ConstantFP::getNullValue wit...

Craig Topper via All-commits all-commits at lists.llvm.org
Mon Apr 3 23:14:23 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1f60c8d025d55f6156c93a63aa3b01f27aabee39
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-04-03 (Mon, 03 Apr 2023)

  Changed paths:
    M llvm/lib/Analysis/ConstantFolding.cpp
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/tools/llvm-stress/llvm-stress.cpp

  Log Message:
  [IR] Replace calls to ConstantFP::getNullValue with ConstantFP::getZero. NFC

There is no getNullValue in ConstantFP. Due to inheritance, we're calling
Constant::getNullValue which handles any type including FP.
Since we already know we want an FP constant we can use ConstantFP::getZero
which might be faster and is a more readable name for an FP zero.

More information about the All-commits mailing list