[RISCV] Add test cases that show that we're too aggressive about using greviw/gorciw...
authorCraig Topper <craig.topper@sifive.com>
Fri, 11 Mar 2022 23:29:26 +0000 (15:29 -0800)
committerCraig Topper <craig.topper@sifive.com>
Sat, 12 Mar 2022 02:02:38 +0000 (18:02 -0800)
commitfa62c5326a9d74a52ed0678db470a3d759f1602a
tree1b5cb4fce295ffc16310b946ff31b4a3505e7763
parenta7b1dccf7a9d9d742567ad0bbac51c7f70308137
[RISCV] Add test cases that show that we're too aggressive about using greviw/gorciw. NFC

We currently type legalize to the W form, but type legalization
doesn't place any requirements on the extended bits. So we are ok
to use GREVI/GORCI for type legalization as long as the control
doesn't cross any bits from the extended bits into the lower bits.

This can allow us to recognize cases where the extended bits end
up being all zeros and we can propagate that information through.

My plan is to move greviw/gorciw formation to isel patterns similar
to slliw.
llvm/test/CodeGen/RISCV/rv64zbb-intrinsic.ll
llvm/test/CodeGen/RISCV/rv64zbp-intrinsic.ll
llvm/test/CodeGen/RISCV/rv64zbp.ll