Skip to content
Commit 9b9a8475 authored by Jean Perier's avatar Jean Perier
Browse files

[flang] do not generate padding/truncation code when character length are equals

When generating character assignment operations, the generic code
generates some code to handle truncation and padding when the length
differ at runtime. A bypass already exists when the length are compile
time constant and match, but it was not used for the trivial case where
the RHS and LHS length is the same SSA value. In such case, even though,
the length is not know at compile time, it is known to be the same.

This will simplify the code creating character temporaries from a
variable in HLFIR that will use this assignment code.

Note that this probably has little impact on performance (llvm may be clever enough
to later catch that for us). But it makes the generated IR a lot more readable at
little cost.

Differential Revision: https://reviews.llvm.org/D139330
parent d09d834b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment