Skip to content

Commit fffbea3

Browse files
committed
[riscv] Remove no-op ptr-to-ptr bitcasts (NFC)
1 parent 5e0e2ad commit fffbea3

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

clang/include/clang/Basic/riscv_vector.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ multiclass RVVVLEFFBuiltin<list<string> types> {
6969
Ops.insert(Ops.begin(), llvm::PoisonValue::get(ResultType));
7070
IntrinsicTypes = {ResultType, Ops[3]->getType()};
7171
}
72-
Ops[1] = Builder.CreateBitCast(Ops[1], ResultType->getPointerTo());
7372
Value *NewVL = Ops[2];
7473
Ops.erase(Ops.begin() + 2);
7574
llvm::Function *F = CGM.getIntrinsic(ID, IntrinsicTypes);
@@ -150,7 +149,6 @@ let HasMaskedOffOperand = false,
150149
// Builtin: (ptr, value, vl). Intrinsic: (value, ptr, vl)
151150
std::swap(Ops[0], Ops[1]);
152151
}
153-
Ops[1] = Builder.CreateBitCast(Ops[1], Ops[0]->getType()->getPointerTo());
154152
if (IsMasked)
155153
IntrinsicTypes = {Ops[0]->getType(), Ops[3]->getType()};
156154
else
@@ -189,7 +187,6 @@ multiclass RVVVSSEBuiltin<list<string> types> {
189187
// Builtin: (ptr, stride, value, vl). Intrinsic: (value, ptr, stride, vl)
190188
std::rotate(Ops.begin(), Ops.begin() + 2, Ops.begin() + 3);
191189
}
192-
Ops[1] = Builder.CreateBitCast(Ops[1], Ops[0]->getType()->getPointerTo());
193190
if (IsMasked)
194191
IntrinsicTypes = {Ops[0]->getType(), Ops[4]->getType()};
195192
else
@@ -215,7 +212,6 @@ multiclass RVVIndexedStore<string op> {
215212
// Builtin: (ptr, index, value, vl). Intrinsic: (value, ptr, index, vl)
216213
std::rotate(Ops.begin(), Ops.begin() + 2, Ops.begin() + 3);
217214
}
218-
Ops[1] = Builder.CreateBitCast(Ops[1], Ops[0]->getType()->getPointerTo());
219215
if (IsMasked)
220216
IntrinsicTypes = {Ops[0]->getType(), Ops[2]->getType(), Ops[4]->getType()};
221217
else

0 commit comments

Comments
 (0)