[PATCH] D126953: Promote bf16 to f32 when the target doesn't support it

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 10 05:08:46 PST 2022


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2912-2915
+    Op = DAG.getNode(
+        ISD::SHL, dl, MVT::i32, Op,
+        DAG.getConstant(16, dl,
+                        TLI.getShiftAmountTy(MVT::i32, DAG.getDataLayout())));
----------------
Why can this just shift into the high bits? Why don't the mantissa bits need to be adjusted down to the low bits?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126953/new/

https://reviews.llvm.org/D126953



More information about the llvm-commits mailing list