-
Notifications
You must be signed in to change notification settings - Fork 14.7k
[RISCV] Create disjoint or in RISCVGatherScatterLowering #151981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-backend-risc-v Author: Iris Shi (el-ev) ChangesWe can creating disjoint or in IRBuilder since #146350. Full diff: https://github.com/llvm/llvm-project/pull/151981.diff 1 Files Affected:
diff --git a/llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp b/llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
index 82c0d8d4738a4..28567ada6c004 100644
--- a/llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
@@ -167,9 +167,8 @@ static std::pair<Value *, Value *> matchStridedStart(Value *Start,
default:
llvm_unreachable("Unexpected opcode");
case Instruction::Or:
- // TODO: We'd be better off creating disjoint or here, but we don't yet
- // have an IRBuilder API for that.
- [[fallthrough]];
+ Start = Builder.CreateOr(Start, Splat, "", /* IsDisjoint = */ true);
+ break;
case Instruction::Add:
Start = Builder.CreateAdd(Start, Splat);
break;
|
Don't we have IR tests for this pass that shouldn't be affected by this change? |
(I guess you meant "that should be affected by this change") |
Yes that is what I meant. |
35838ed
to
62c43b0
Compare
Co-authored-by: Min-Yih Hsu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We can create disjoint or in IRBuilder since #146350.