[clang] [clang][RISCVVEmitter] Remove no-op ptr-to-ptr bitcast (NFC) (PR #74179)

via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 1 20:15:56 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Youngsuk Kim (JOE1994)

<details>
<summary>Changes</summary>

Remove ptr-to-ptr bitcast which was added back in 939352b6ec31db4e8defe07856868438fbc5340d . With opaque pointers, the bitcast is now redundant.

Opaque ptr cleanup effort.

---
Full diff: https://github.com/llvm/llvm-project/pull/74179.diff


1 Files Affected:

- (modified) clang/utils/TableGen/RISCVVEmitter.cpp (-3) 


``````````diff
diff --git a/clang/utils/TableGen/RISCVVEmitter.cpp b/clang/utils/TableGen/RISCVVEmitter.cpp
index cf731e8414a3b83..1fb41805a0473dd 100644
--- a/clang/utils/TableGen/RISCVVEmitter.cpp
+++ b/clang/utils/TableGen/RISCVVEmitter.cpp
@@ -180,13 +180,10 @@ void emitCodeGenSwitchBody(const RVVIntrinsic *RVVI, raw_ostream &OS) {
     return;
   }
 
-  // Cast pointer operand of vector load intrinsic.
   for (const auto &I : enumerate(RVVI->getInputTypes())) {
     if (I.value()->isPointer()) {
       assert(RVVI->getIntrinsicTypes().front() == -1 &&
              "RVVI should be vector load intrinsic.");
-      OS << "  Ops[" << I.index() << "] = Builder.CreateBitCast(Ops[";
-      OS << I.index() << "], ResultType->getPointerTo());\n";
     }
   }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/74179


More information about the cfe-commits mailing list