Commit e506bfa
committed
[SDAG] Fix incorrect use of undef for boolean contents (PR63055)
FoldSetCC() returns UNDEF in a number of cases. However, the SetCC
result must follow BooleanContents. Unless the type is a
pre-legalization i1 or we have UndefinedBooleanContents, the use of
UNDEF will not uphold the requirement that the top bits are either
zero or match the low bit. In such cases, return zero instead.
Fixes llvm#63055.
Differential Revision: https://reviews.llvm.org/D1518831 parent 3ddd186 commit e506bfa
File tree
3 files changed
+24
-14
lines changed- llvm
- lib/CodeGen/SelectionDAG
- test/CodeGen/X86
3 files changed
+24
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2436 | 2436 | | |
2437 | 2437 | | |
2438 | 2438 | | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
2439 | 2449 | | |
2440 | 2450 | | |
2441 | 2451 | | |
| |||
2465 | 2475 | | |
2466 | 2476 | | |
2467 | 2477 | | |
2468 | | - | |
| 2478 | + | |
2469 | 2479 | | |
2470 | 2480 | | |
2471 | 2481 | | |
2472 | 2482 | | |
2473 | | - | |
| 2483 | + | |
2474 | 2484 | | |
2475 | 2485 | | |
2476 | 2486 | | |
| |||
2496 | 2506 | | |
2497 | 2507 | | |
2498 | 2508 | | |
2499 | | - | |
| 2509 | + | |
2500 | 2510 | | |
2501 | 2511 | | |
2502 | 2512 | | |
2503 | 2513 | | |
2504 | | - | |
| 2514 | + | |
2505 | 2515 | | |
2506 | 2516 | | |
2507 | 2517 | | |
2508 | 2518 | | |
2509 | 2519 | | |
2510 | | - | |
| 2520 | + | |
2511 | 2521 | | |
2512 | 2522 | | |
2513 | 2523 | | |
2514 | 2524 | | |
2515 | | - | |
| 2525 | + | |
2516 | 2526 | | |
2517 | 2527 | | |
2518 | 2528 | | |
2519 | 2529 | | |
2520 | | - | |
| 2530 | + | |
2521 | 2531 | | |
2522 | 2532 | | |
2523 | 2533 | | |
2524 | 2534 | | |
2525 | 2535 | | |
2526 | | - | |
| 2536 | + | |
2527 | 2537 | | |
2528 | 2538 | | |
2529 | 2539 | | |
| |||
2568 | 2578 | | |
2569 | 2579 | | |
2570 | 2580 | | |
2571 | | - | |
| 2581 | + | |
2572 | 2582 | | |
2573 | 2583 | | |
2574 | 2584 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1878 | 1878 | | |
1879 | 1879 | | |
1880 | 1880 | | |
1881 | | - | |
1882 | | - | |
| 1881 | + | |
| 1882 | + | |
1883 | 1883 | | |
1884 | 1884 | | |
| 1885 | + | |
1885 | 1886 | | |
1886 | 1887 | | |
1887 | 1888 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
343 | 342 | | |
344 | 343 | | |
345 | 344 | | |
346 | | - | |
| 345 | + | |
347 | 346 | | |
348 | 347 | | |
349 | 348 | | |
350 | 349 | | |
351 | 350 | | |
352 | | - | |
| 351 | + | |
353 | 352 | | |
354 | 353 | | |
355 | 354 | | |
| |||
0 commit comments