Skip to content

Commit 0dc3ad6

Browse files
committed
Added ROLW/RORW + SLLW/SRAW/SRLW for canCreateUndefOrPoisonForTargetNode
1 parent 920079b commit 0dc3ad6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21477,6 +21477,14 @@ bool RISCVTargetLowering::canCreateUndefOrPoisonForTargetNode(
2147721477

2147821478
// TODO: Add more target nodes.
2147921479
switch (Op.getOpcode()) {
21480+
case RISCVISD::SLLW:
21481+
case RISCVISD::SRAW:
21482+
case RISCVISD::SRLW:
21483+
case RISCVISD::RORW:
21484+
case RISCVISD::ROLW:
21485+
// Only the lower 5 bits of RHS are read, guaranteeing the rotate/shift
21486+
// amount is bounds.
21487+
return false;
2148021488
case RISCVISD::SELECT_CC:
2148121489
// Integer select_cc cannot create poison.
2148221490
// TODO: What are the FP poison semantics?

0 commit comments

Comments
 (0)