diff options
author | Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> | 2022-04-28 18:31:05 +0200 |
---|---|---|
committer | Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> | 2022-04-28 18:42:16 +0200 |
commit | 3a39bb96ca812d1cbd027803112e94f701ad8687 (patch) | |
tree | 173062adddfd643741d17dc6641ba0be0fc08b4e /llvm/lib/CodeGen/ModuloSchedule.cpp | |
parent | f326df34bc179e41ea17d31e1ffba4a479e45589 (diff) | |
download | llvm-3a39bb96ca812d1cbd027803112e94f701ad8687.zip llvm-3a39bb96ca812d1cbd027803112e94f701ad8687.tar.gz llvm-3a39bb96ca812d1cbd027803112e94f701ad8687.tar.bz2 |
[SelectionDAG] Use correct boolean representation in FoldConstantArithmetic
The description of SETCC says
/// SetCC operator - This evaluates to a true value iff the condition is
/// true. If the result value type is not i1 then the high bits conform
/// to getBooleanContents.
Without this patch, we sign extended the i1 to the used larger type
regardless of getBooleanContents. This resulted in miscompiles, as
shown in the attached testcase that ended up returning -1 instead of
1 when using -mattr=+v.
Fixes https://github.com/llvm/llvm-project/issues/55168
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D124618
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
0 files changed, 0 insertions, 0 deletions