Commit 291c047
[TIR] Fix Bug in VectorizeLoop (#17039)
* [TIR] Fix Bug in VectorizeLoop
This PR fixes a bug in vectorize loop introduced
related to recent change.
The visit to condition can write need scalarize to true
then the followup visit to then case can trigger an ICHECK.
The visit to let value can also write need scalarize flag
in which case we need to immediately scalarize.
* Add unit test
---------
Co-authored-by: tqchen <[email protected]>1 parent 71f7af7 commit 291c047
File tree
2 files changed
+37
-4
lines changed- src/tir/transforms
- tests/python/tir-transform
2 files changed
+37
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
679 | 684 | | |
680 | 685 | | |
681 | 686 | | |
682 | 687 | | |
683 | 688 | | |
684 | | - | |
685 | 689 | | |
686 | 690 | | |
687 | 691 | | |
| |||
693 | 697 | | |
694 | 698 | | |
695 | 699 | | |
696 | | - | |
| 700 | + | |
697 | 701 | | |
698 | 702 | | |
699 | 703 | | |
| |||
710 | 714 | | |
711 | 715 | | |
712 | 716 | | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
713 | 723 | | |
714 | 724 | | |
715 | 725 | | |
| |||
Lines changed: 25 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | | - | |
23 | | - | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
315 | 338 | | |
316 | 339 | | |
317 | 340 | | |
| |||
0 commit comments