[llvm] Nvptx port LowerBITCAST to SelectionDAG (PR #120903)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 22 08:19:19 PST 2024


================
@@ -2174,8 +2174,12 @@ SDValue DAGTypeLegalizer::PromoteIntOp_ATOMIC_STORE(AtomicSDNode *N) {
 }
 
 SDValue DAGTypeLegalizer::PromoteIntOp_BITCAST(SDNode *N) {
-  // This should only occur in unusual situations like bitcasting to an
-  // x86_fp80, so just turn it into a store+load
+  // Use the custom lowering.
+  if (const auto Res = LowerBitcast(N)) {
+    return Res;
+  }
----------------
RKSimon wrote:

(style) Unnecessary braces / avoid auto
```cpp
if (SDValue Res = LowerBitcast(N))
  return Res;
```

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


More information about the llvm-commits mailing list