diff options
author | Craig Topper <craig.topper@sifive.com> | 2023-10-24 12:35:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-24 12:35:55 -0700 |
commit | 20020c1b43d543034dcc4a0c1715db558d6de773 (patch) | |
tree | 0274d5d7ca5fd97a2b1b49615e3d1a35742235ad /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | 8244ff6739a09cb75e6e7fd1c24b85e2b1397266 (diff) | |
download | llvm-20020c1b43d543034dcc4a0c1715db558d6de773.zip llvm-20020c1b43d543034dcc4a0c1715db558d6de773.tar.gz llvm-20020c1b43d543034dcc4a0c1715db558d6de773.tar.bz2 |
[DAGCombiner] Fix misuse of getZeroExtendInReg in SimplifySelectCC. (#70066)
If VT has less bits than SCC, using a ZeroExtendInReg isn't going to fix
it. That's an AND instruction. We need to truncate the value instead.
This should be ok because we already checked that the boolean contents
is ZeroOrOne so the setcc can only produce 0 or 1.
No test because I found this while trying to make i32 legal for RISC-V
64 which I'm not ready to upload yet. You can see in the coverage report
that this line isn't tested today.
https://lab.llvm.org/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp.html#L27270
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions