Commit 22897bc
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/D151883
(cherry picked from commit e506bfa)1 parent 72ef6d7 commit 22897bc
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 | |
|---|---|---|---|
| |||
2381 | 2381 | | |
2382 | 2382 | | |
2383 | 2383 | | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
2384 | 2394 | | |
2385 | 2395 | | |
2386 | 2396 | | |
| |||
2410 | 2420 | | |
2411 | 2421 | | |
2412 | 2422 | | |
2413 | | - | |
| 2423 | + | |
2414 | 2424 | | |
2415 | 2425 | | |
2416 | 2426 | | |
2417 | 2427 | | |
2418 | | - | |
| 2428 | + | |
2419 | 2429 | | |
2420 | 2430 | | |
2421 | 2431 | | |
| |||
2441 | 2451 | | |
2442 | 2452 | | |
2443 | 2453 | | |
2444 | | - | |
| 2454 | + | |
2445 | 2455 | | |
2446 | 2456 | | |
2447 | 2457 | | |
2448 | 2458 | | |
2449 | | - | |
| 2459 | + | |
2450 | 2460 | | |
2451 | 2461 | | |
2452 | 2462 | | |
2453 | 2463 | | |
2454 | 2464 | | |
2455 | | - | |
| 2465 | + | |
2456 | 2466 | | |
2457 | 2467 | | |
2458 | 2468 | | |
2459 | 2469 | | |
2460 | | - | |
| 2470 | + | |
2461 | 2471 | | |
2462 | 2472 | | |
2463 | 2473 | | |
2464 | 2474 | | |
2465 | | - | |
| 2475 | + | |
2466 | 2476 | | |
2467 | 2477 | | |
2468 | 2478 | | |
2469 | 2479 | | |
2470 | 2480 | | |
2471 | | - | |
| 2481 | + | |
2472 | 2482 | | |
2473 | 2483 | | |
2474 | 2484 | | |
| |||
2513 | 2523 | | |
2514 | 2524 | | |
2515 | 2525 | | |
2516 | | - | |
| 2526 | + | |
2517 | 2527 | | |
2518 | 2528 | | |
2519 | 2529 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1920 | 1920 | | |
1921 | 1921 | | |
1922 | 1922 | | |
1923 | | - | |
1924 | | - | |
| 1923 | + | |
| 1924 | + | |
1925 | 1925 | | |
1926 | 1926 | | |
| 1927 | + | |
1927 | 1928 | | |
1928 | 1929 | | |
1929 | 1930 | | |
| |||
| 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