[all-commits] [llvm/llvm-project] c024fa: [flang] Use llvm.zext when converting from i1 -> iXX

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Mon Mar 13 22:32:03 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c024fa4b5bd6cff4bd5521bfd94fbbb9586a78ee
      https://github.com/llvm/llvm-project/commit/c024fa4b5bd6cff4bd5521bfd94fbbb9586a78ee
  Author: Valentin Clement <clementval at gmail.com>
  Date:   2023-03-14 (Tue, 14 Mar 2023)

  Changed paths:
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    M flang/test/Fir/convert-to-llvm.fir

  Log Message:
  -----------
  [flang] Use llvm.zext when converting from i1 -> iXX

CodeGen used llvm.sext when converting fir.convert %0 : (i1) -> iXX
where iXX is any integer. This leads to wrong values when the initial
i1 is equal to 1.

Reviewed By: PeteSteinfeld

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




More information about the All-commits mailing list