[flang] Do not create arith.extui with same from/to type
authorValentin Clement (バレンタイン クレメン) <clementval@gmail.com>
Sun, 24 Apr 2022 18:37:27 +0000 (20:37 +0200)
committerValentin Clement <clementval@gmail.com>
Sun, 24 Apr 2022 18:37:48 +0000 (20:37 +0200)
commit6243b90ead7a4d9e4097849498bea6749836de98
treee62d99252b42a1cc41961b5a87f5f1c0301cf159
parent3f0f20366622ee5fd35a1d65d7db5226f5e5751f
[flang] Do not create arith.extui with same from/to type

In some case the lowering of `ichar` is generating an `arith.extui` operation
with the same from/to type. This operation do not accept from/to types to be
the same. If the from/to types are identical, we do not generate the extra
operation.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D124107
flang/lib/Lower/IntrinsicCall.cpp
flang/test/Lower/Intrinsics/ichar.f90