WebAssembly: print immediates
[oota-llvm.git] / lib / Target / WebAssembly / WebAssemblyISelLowering.cpp
index 4360116a7f19122864a5c3cf2a9083cd5da31769..ee155fdbb2260282fa882a2f60e327fde3ac9ca2 100644 (file)
@@ -108,7 +108,11 @@ WebAssemblyTargetLowering::WebAssemblyTargetLowering(
   // Compute derived properties from the register classes.
   computeRegisterProperties(Subtarget->getRegisterInfo());
 
-  // FIXME: setOperationAction...
+  // FIXME: many setOperationAction are missing...
+
+  // Don't expand the following types to constant pools.
+  setOperationAction(ISD::ConstantFP, MVT::f32, Legal);
+  setOperationAction(ISD::ConstantFP, MVT::f64, Legal);
 }
 
 MVT WebAssemblyTargetLowering::getScalarShiftAmountTy(const DataLayout &DL,