aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CommandFlags.cpp
diff options
context:
space:
mode:
authorLeandro Lupori <leandro.lupori@linaro.org>2023-03-28 14:28:56 +0000
committerLeandro Lupori <leandro.lupori@linaro.org>2023-03-31 09:13:14 -0300
commit5e5176adb1834b215412a90acadfa0d14c18de8f (patch)
tree37453dd34167d37425a7d59f64c60aa41824fdba /llvm/lib/CodeGen/CommandFlags.cpp
parent942b403ff1a412778c9fb97bd53b44e35b544b0e (diff)
downloadllvm-5e5176adb1834b215412a90acadfa0d14c18de8f.zip
llvm-5e5176adb1834b215412a90acadfa0d14c18de8f.tar.gz
llvm-5e5176adb1834b215412a90acadfa0d14c18de8f.tar.bz2
[flang] Don't fold operation when shapes differ
When folding a binary operation between two array constructors, it is necessary to check if each value contained in the left operand has the same rank and shape as the one on the right. Otherwise, lowering would end up with an operation between values of different ranks/shapes, which could result in a crash. For instance, the following code was crashing the compiler: integer :: x(4), y(2, 2), z(4) z = (/x/) + (/y/) Fixes #60229 Reviewed By: klausler, jeanPerier Differential Revision: https://reviews.llvm.org/D147181
Diffstat (limited to 'llvm/lib/CodeGen/CommandFlags.cpp')
0 files changed, 0 insertions, 0 deletions