aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp')
-rw-r--r--llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp b/llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
index 82c0d8d..80a48c5 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;