[all-commits] [llvm/llvm-project] 20b9ed: [RISCV][ISel] Fix types in `tryFoldSelectIntoOp` (...
Yingwei Zheng via All-commits
all-commits at lists.llvm.org
Wed May 1 11:40:21 PDT 2024
Branch: refs/heads/release/18.x
Home: https://github.com/llvm/llvm-project
Commit: 20b9ed64ea074f03057e1d775a1d9d0f067ab0b0
https://github.com/llvm/llvm-project/commit/20b9ed64ea074f03057e1d775a1d9d0f067ab0b0
Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
Date: 2024-05-01 (Wed, 01 May 2024)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
A llvm/test/CodeGen/RISCV/pr90652.ll
Log Message:
-----------
[RISCV][ISel] Fix types in `tryFoldSelectIntoOp` (#90659)
```
SelectionDAG has 17 nodes:
t0: ch,glue = EntryToken
t6: i64,ch = CopyFromReg t0, Register:i64 %2
t8: i1 = truncate t6
t4: i64,ch = CopyFromReg t0, Register:i64 %1
t7: i1 = truncate t4
t2: i64,ch = CopyFromReg t0, Register:i64 %0
t10: i64,i1 = saddo t2, Constant:i64<1>
t11: i1 = or t8, t10:1
t12: i1 = select t7, t8, t11
t13: i64 = any_extend t12
t15: ch,glue = CopyToReg t0, Register:i64 $x10, t13
t16: ch = RISCVISD::RET_GLUE t15, Register:i64 $x10, t15:1
```
`OtherOpVT` should be i1, but `OtherOp->getValueType(0)` returns `i64`,
which ignores `ResNo` in `SDValue`.
Fix https://github.com/llvm/llvm-project/issues/90652.
(cherry picked from commit 2647bd73696ae987addd0e74774a44108accb1e6)
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