[WebAssembly] Fix legalization of shift operators on large integer types.
[oota-llvm.git] / test / CodeGen / WebAssembly / legalize.ll
index 7cc1246a86e82aa9cd9a08aa1ebab734a5eb99a7..e780b2ee36ca30f240a4ecb3921955b21310538f 100644 (file)
@@ -51,3 +51,12 @@ define float @fpconv_f64_f32(double *%p) {
   %e = fptrunc double %v to float
   ret float %e
 }
+
+; Check that big shifts work. This generates a big pile of code from the
+; legalizer; the main thing here is that we don't abort.
+
+; CHECK-LABEL: bigshift:
+define i1024 @bigshift(i1024 %a, i1024 %b) {
+    %c = shl i1024 %a, %b
+    ret i1024 %c
+}