Commit 20020c1
authored
[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#L272701 parent 8244ff6 commit 20020c1
1 file changed
+1
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27274 | 27274 | | |
27275 | 27275 | | |
27276 | 27276 | | |
27277 | | - | |
27278 | | - | |
27279 | | - | |
27280 | | - | |
| 27277 | + | |
27281 | 27278 | | |
27282 | 27279 | | |
27283 | 27280 | | |
| |||
0 commit comments