3 Commits

Author SHA1 Message Date
Nikita Popov
1456b68686 [RISCV] Convert some tests to opaque pointers (NFC) 2022-12-19 13:01:08 +01:00
eopXD
2cadf84fc8 [RISCV] Pass OptLevel to RISCVDAGToDAGISel correctly
Originally, `OptLevel` isn't passed into the `MachineFunctionPass`.
This lets the default parameter of `SelectionDAGISel`, which is
`CodeGenOpt::Default`, be passed in. OptLevelChanger captures the
optimization level with the parameter, and rather not the value
within `TargetMachine`. This lets the optimization be
unintentionally overwriten if other value than `CodeGenOpt::Default`
passed.

This patch fixes this by passing the optimization level rather
than using the default value.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D126641
2022-05-30 17:22:50 -07:00
eopXD
51002bdb5e [RISCV] Precommit test case to show bug in RISCVISelDagToDag
The optimization level should not be restored into O2.
This is a pre-commit test case to show fix in D126641.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D126677
2022-05-30 15:59:20 -07:00