Commit 6140b5b
authored
[RISCV] Use RISCVISD::SHL_ADD in transformAddShlImm (#89832)
Doing so avoids negative interactions with other combines which don't
know the shl_add is a single instruction. From the commit log, we've had
several combine loops already.
This was originally posted as part of #88791, where a bug was pointed
out. That bug was fixed by #89789 which hits the same issue from another
angle. To confirm the fix, I included the reduced test case here.1 parent 91a14db commit 6140b5b
File tree
2 files changed
+36
-8
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV
2 files changed
+36
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12987 | 12987 | | |
12988 | 12988 | | |
12989 | 12989 | | |
12990 | | - | |
12991 | | - | |
12992 | | - | |
12993 | | - | |
| 12990 | + | |
| 12991 | + | |
| 12992 | + | |
12994 | 12993 | | |
12995 | 12994 | | |
12996 | 12995 | | |
| |||
13226 | 13225 | | |
13227 | 13226 | | |
13228 | 13227 | | |
13229 | | - | |
| 13228 | + | |
| 13229 | + | |
13230 | 13230 | | |
| 13231 | + | |
13231 | 13232 | | |
13232 | 13233 | | |
13233 | 13234 | | |
13234 | 13235 | | |
13235 | | - | |
13236 | | - | |
| 13236 | + | |
| 13237 | + | |
| 13238 | + | |
13237 | 13239 | | |
13238 | 13240 | | |
13239 | 13241 | | |
| |||
16230 | 16232 | | |
16231 | 16233 | | |
16232 | 16234 | | |
16233 | | - | |
| 16235 | + | |
16234 | 16236 | | |
16235 | 16237 | | |
16236 | 16238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
944 | 944 | | |
945 | 945 | | |
946 | 946 | | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
0 commit comments