History log of /llvm-project/llvm/test/CodeGen/RISCV/select-to-and-zext.ll (Results 1 – 3 of 3)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3
# 86240751 06-Oct-2023 Philip Reames <preames@rivosinc.com>

[RISCV] Strip W suffix from ADDIW (#68425)

The motivation of this change is simply to reduce test duplication. As
can be seen in the (massive) test delta, we have many tests whose output
differ on

[RISCV] Strip W suffix from ADDIW (#68425)

The motivation of this change is simply to reduce test duplication. As
can be seen in the (massive) test delta, we have many tests whose output
differ only due to the use of addi on rv32 vs addiw on rv64 when the
high bits are don't care.

As an aside, we don't need to worry about the non-zero immediate
restriction on the compressed variants because we're not directly
forming the compressed variants. If we happen to get a zero immediate
for the ADDI, then either a later optimization will strip the useless
instruction or the encoder is responsible for not compressing the
instruction.

show more ...


Revision tags: llvmorg-17.0.2
# de7881eb 19-Sep-2023 Noah Goldstein <goldstein.w.n@gmail.com>

[DAGCombiner] Combine `(select c, (and X, 1), 0)` -> `(and (zext c), X)`

The middle end canonicalizes:
`(and (zext c), X)`
-> `(select c, (and X, 1), 0)`

But the `and` + `zext` form gets better

[DAGCombiner] Combine `(select c, (and X, 1), 0)` -> `(and (zext c), X)`

The middle end canonicalizes:
`(and (zext c), X)`
-> `(select c, (and X, 1), 0)`

But the `and` + `zext` form gets better codegen.

show more ...


# e3e9c940 19-Sep-2023 Noah Goldstein <goldstein.w.n@gmail.com>

[X86][AArch64][RISCV] Add tests for combining `(select c, (and X, 1), 0)` -> `(and (zext c), X)`; NFC