[all-commits] [llvm/llvm-project] c0cc98: [Float2Int] Make sure dependent ranges are calcula...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Apr 4 01:18:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c0cc98251a453e2850c25adb10a3fd6b3e86a2e8
      https://github.com/llvm/llvm-project/commit/c0cc98251a453e2850c25adb10a3fd6b3e86a2e8
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-04-04 (Mon, 04 Apr 2022)

  Changed paths:
    M llvm/include/llvm/Transforms/Scalar/Float2Int.h
    M llvm/lib/Transforms/Scalar/Float2Int.cpp
    M llvm/test/Transforms/Float2Int/pr54669.ll

  Log Message:
  -----------
  [Float2Int] Make sure dependent ranges are calculated first (PR54669)

The range calculation in walkForwards() assumes that the ranges of
the operands have already been calculated. With the used visit
order, this is not necessarily the case when there are multiple
roots. (There is nothing guaranteeing that instructions are visited
in topological order.)

Fix this by queuing instructions for reprocessing if the operand
ranges haven't been calculated yet.

Fixes https://github.com/llvm/llvm-project/issues/54669.

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




More information about the All-commits mailing list