[all-commits] [llvm/llvm-project] ffc459: [RISCV] Add a check in lowerSELECT after foldBinOp...
Yunzezhu94 via All-commits
all-commits at lists.llvm.org
Thu Jul 4 19:55:58 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ffc459de7540eaf9bdbcb7b7cc2376fd7e9e7f11
https://github.com/llvm/llvm-project/commit/ffc459de7540eaf9bdbcb7b7cc2376fd7e9e7f11
Author: Yunzezhu94 <93851382+Yunzezhu94 at users.noreply.github.com>
Date: 2024-07-05 (Fri, 05 Jul 2024)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
A llvm/test/CodeGen/RISCV/fold-binop-into-select-return-constant.ll
Log Message:
-----------
[RISCV] Add a check in lowerSELECT after foldBinOpIntoSelectIfProfitable (#97391)
In certain case foldBinOpIntoSelectIfProfitable may return a constant
node, the node will be lowered in lowerSELECT and lead to crash.
This patch fix the bug by adding an extra check before lowerSELECT that
do lowerSELECT as before when foldBinOpIntoSelectIfProfitable returns a
select node, and return the node directly when
foldBinOpIntoSelectIfProfitable returns a constant node.
Fixes https://github.com/llvm/llvm-project/issues/97390
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list