commit | d7cd8cb523aa04581e63645ec906c81c2901b9d8 | [log] [tgz] |
---|---|---|
author | Craig Topper <craig.topper@sifive.com> | Fri Aug 05 12:41:28 2022 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Aug 05 12:53:14 2022 -0700 |
tree | 5a1d328c034ca0a4bd828a3851db05e92965afa3 | |
parent | 6a4c0551fbd905397666676142d59af81585c2cb [diff] |
[RISCV] Don't use li+sh3add for constants that can use lui+add. If we're adding a constant that can't use addi we try a few tricks, one of which is using li+sh3add. We should not do this if lui+add would work. For example adding 8192. Using sh3add prevents folding a sext.w to form addw, thus increasing instruction count. GitOrigin-RevId: 75c64c7c4e40ec9bc16d90fee46353628d08d62d