Author: Benjamin Kramer Date: 2023-11-14T19:04:40+01:00 New Revision: fffbea33d76950156d4a7a5eec44751da0b06562
URL: https://github.com/llvm/llvm-project/commit/fffbea33d76950156d4a7a5eec44751da0b06562 DIFF: https://github.com/llvm/llvm-project/commit/fffbea33d76950156d4a7a5eec44751da0b06562.diff LOG: [riscv] Remove no-op ptr-to-ptr bitcasts (NFC) Added: Modified: clang/include/clang/Basic/riscv_vector.td Removed: ################################################################################ diff --git a/clang/include/clang/Basic/riscv_vector.td b/clang/include/clang/Basic/riscv_vector.td index 1d24b4e75f9dd5f..682f1d5c8af68c0 100644 --- a/clang/include/clang/Basic/riscv_vector.td +++ b/clang/include/clang/Basic/riscv_vector.td @@ -69,7 +69,6 @@ multiclass RVVVLEFFBuiltin<list<string> types> { Ops.insert(Ops.begin(), llvm::PoisonValue::get(ResultType)); IntrinsicTypes = {ResultType, Ops[3]->getType()}; } - Ops[1] = Builder.CreateBitCast(Ops[1], ResultType->getPointerTo()); Value *NewVL = Ops[2]; Ops.erase(Ops.begin() + 2); llvm::Function *F = CGM.getIntrinsic(ID, IntrinsicTypes); @@ -150,7 +149,6 @@ let HasMaskedOffOperand = false, // Builtin: (ptr, value, vl). Intrinsic: (value, ptr, vl) std::swap(Ops[0], Ops[1]); } - Ops[1] = Builder.CreateBitCast(Ops[1], Ops[0]->getType()->getPointerTo()); if (IsMasked) IntrinsicTypes = {Ops[0]->getType(), Ops[3]->getType()}; else @@ -189,7 +187,6 @@ multiclass RVVVSSEBuiltin<list<string> types> { // Builtin: (ptr, stride, value, vl). Intrinsic: (value, ptr, stride, vl) std::rotate(Ops.begin(), Ops.begin() + 2, Ops.begin() + 3); } - Ops[1] = Builder.CreateBitCast(Ops[1], Ops[0]->getType()->getPointerTo()); if (IsMasked) IntrinsicTypes = {Ops[0]->getType(), Ops[4]->getType()}; else @@ -215,7 +212,6 @@ multiclass RVVIndexedStore<string op> { // Builtin: (ptr, index, value, vl). Intrinsic: (value, ptr, index, vl) std::rotate(Ops.begin(), Ops.begin() + 2, Ops.begin() + 3); } - Ops[1] = Builder.CreateBitCast(Ops[1], Ops[0]->getType()->getPointerTo()); if (IsMasked) IntrinsicTypes = {Ops[0]->getType(), Ops[2]->getType(), Ops[4]->getType()}; else _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits