[PATCH] D18426: Remove unsafe AssertZext after promoting result of FP_TO_FP16

Pirama Arumuga Nainar via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 07:11:14 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL264285: Remove unsafe AssertZext after promoting result of FP_TO_FP16 (authored by pirama).

Changed prior to commit:
  http://reviews.llvm.org/D18426?vs=51506&id=51553#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D18426

Files:
  llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  llvm/trunk/test/CodeGen/ARM/fp16-v3.ll

Index: llvm/trunk/test/CodeGen/ARM/fp16-v3.ll
===================================================================
--- llvm/trunk/test/CodeGen/ARM/fp16-v3.ll
+++ llvm/trunk/test/CodeGen/ARM/fp16-v3.ll
@@ -25,4 +25,16 @@
   ret void
 }
 
+; CHECK-LABEL: test_bitcast:
+; CHECK: vcvtb.f16.f32
+; CHECK: vcvtb.f16.f32
+; CHECK: vcvtb.f16.f32
+; CHECK: pkhbt
+; CHECK: uxth
+define void @test_bitcast(<3 x half> %inp, <3 x i16>* %arr) #0 {
+  %bc = bitcast <3 x half> %inp to <3 x i16>
+  store <3 x i16> %bc, <3 x i16>* %arr, align 8
+  ret void
+}
+
 attributes #0 = { nounwind }
Index: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -436,10 +436,7 @@
   EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), N->getValueType(0));
   SDLoc dl(N);
 
-  SDValue Res = DAG.getNode(N->getOpcode(), dl, NVT, N->getOperand(0));
-
-  return DAG.getNode(ISD::AssertZext, dl,
-                     NVT, Res, DAG.getValueType(N->getValueType(0)));
+  return DAG.getNode(N->getOpcode(), dl, NVT, N->getOperand(0));
 }
 
 SDValue DAGTypeLegalizer::PromoteIntRes_INT_EXTEND(SDNode *N) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18426.51553.patch
Type: text/x-patch
Size: 1285 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160324/0d4e2bb7/attachment.bin>


More information about the llvm-commits mailing list