[all-commits] [llvm/llvm-project] 869063: [FuncSpec] Use std::pow instead of operator^

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Tue Jun 15 19:16:12 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 86906304d8cd7dcb4478283866b56ba52e1e224e
      https://github.com/llvm/llvm-project/commit/86906304d8cd7dcb4478283866b56ba52e1e224e
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2021-06-16 (Wed, 16 Jun 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
    A llvm/test/Transforms/FunctionSpecialization/function-specialization-loop.ll
    M llvm/test/Transforms/FunctionSpecialization/function-specialization-recursive.ll
    M llvm/test/Transforms/FunctionSpecialization/function-specialization3.ll

  Log Message:
  -----------
  [FuncSpec] Use std::pow instead of operator^

The original implementation calculating UserBonus uses operator ^, which means XOR in C++
language.
At the first glance of reviewing, I thought it should be power, my bad.
It doesn't make sense to use XOR here. So I believe it should be a
carelessness as I made.

Test Plan: check-all

Reviewed By: SjoerdMeijer

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




More information about the All-commits mailing list