Commit d2af7d1
committed
[GlobalISel] Add known bits and sign-bits handling for G_SPLAT_VECTOR
This forwards the KnownBits / SignBits from the scalar operand through to the
vector elements. The value is implicitly truncated if it is larger than the
vector element size. The change in GISelValueTracking::computeNumSignBits
allows scalable sign-bits using a single element demanded elts, and brings it
in line with what is done in ValueTracking and SDAG (and
GISelValueTracking::getKnownBits). That was my main reason for adding this
opcode, to prevent scalable vector asserts.1 parent 1001d6a commit d2af7d1
File tree
2 files changed
+53
-1
lines changed- llvm
- lib/CodeGen/GlobalISel
- test/CodeGen/AArch64/GlobalISel
2 files changed
+53
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
225 | 233 | | |
226 | 234 | | |
227 | 235 | | |
| |||
854 | 862 | | |
855 | 863 | | |
856 | 864 | | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
857 | 874 | | |
858 | 875 | | |
859 | 876 | | |
| |||
889 | 906 | | |
890 | 907 | | |
891 | 908 | | |
892 | | - | |
| 909 | + | |
893 | 910 | | |
894 | 911 | | |
895 | 912 | | |
| |||
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments