diff --git a/lld/wasm/WriterUtils.cpp b/lld/wasm/WriterUtils.cpp
--- a/lld/wasm/WriterUtils.cpp
+++ b/lld/wasm/WriterUtils.cpp
@@ -30,8 +30,6 @@
     return "f64";
   case ValType::V128:
     return "v128";
-  case ValType::EXNREF:
-    return "exnref";
   case ValType::FUNCREF:
     return "funcref";
   case ValType::EXTERNREF:
diff --git a/llvm/include/llvm/BinaryFormat/Wasm.h b/llvm/include/llvm/BinaryFormat/Wasm.h
--- a/llvm/include/llvm/BinaryFormat/Wasm.h
+++ b/llvm/include/llvm/BinaryFormat/Wasm.h
@@ -244,7 +244,6 @@
   WASM_TYPE_F64 = 0x7C,
   WASM_TYPE_V128 = 0x7B,
   WASM_TYPE_FUNCREF = 0x70,
-  WASM_TYPE_EXNREF = 0x68,
   WASM_TYPE_EXTERNREF = 0x6F,
   WASM_TYPE_FUNC = 0x60,
   WASM_TYPE_NORESULT = 0x40, // for blocks with no result values
@@ -379,7 +378,6 @@
   F32 = WASM_TYPE_F32,
   F64 = WASM_TYPE_F64,
   V128 = WASM_TYPE_V128,
-  EXNREF = WASM_TYPE_EXNREF,
   FUNCREF = WASM_TYPE_FUNCREF,
   EXTERNREF = WASM_TYPE_EXTERNREF,
 };
diff --git a/llvm/include/llvm/CodeGen/ValueTypes.td b/llvm/include/llvm/CodeGen/ValueTypes.td
--- a/llvm/include/llvm/CodeGen/ValueTypes.td
+++ b/llvm/include/llvm/CodeGen/ValueTypes.td
@@ -193,10 +193,9 @@
 def FlagVT : ValueType<0  , 158>;   // Pre-RA sched glue
 def isVoid : ValueType<0  , 159>;   // Produces no value
 def untyped: ValueType<8  , 160>;   // Produces an untyped value
-def exnref : ValueType<0  , 161>;   // WebAssembly's exnref type
-def funcref : ValueType<0  , 162>;   // WebAssembly's funcref type
-def externref : ValueType<0  , 163>;   // WebAssembly's externref type
-def x86amx : ValueType<8192, 164>;   // X86 AMX value
+def funcref : ValueType<0  , 161>;   // WebAssembly's funcref type
+def externref : ValueType<0  , 162>;   // WebAssembly's externref type
+def x86amx : ValueType<8192, 163>;   // X86 AMX value
 
 
 def token  : ValueType<0  , 248>;   // TokenTy
diff --git a/llvm/include/llvm/Support/MachineValueType.h b/llvm/include/llvm/Support/MachineValueType.h
--- a/llvm/include/llvm/Support/MachineValueType.h
+++ b/llvm/include/llvm/Support/MachineValueType.h
@@ -36,129 +36,129 @@
 
       // If you change this numbering, you must change the values in
       // ValueTypes.td as well!
-      Other          =   1,   // This is a non-standard value
-      i1             =   2,   // This is a 1 bit integer value
-      i8             =   3,   // This is an 8 bit integer value
-      i16            =   4,   // This is a 16 bit integer value
-      i32            =   5,   // This is a 32 bit integer value
-      i64            =   6,   // This is a 64 bit integer value
-      i128           =   7,   // This is a 128 bit integer value
+      Other = 1, // This is a non-standard value
+      i1 = 2,    // This is a 1 bit integer value
+      i8 = 3,    // This is an 8 bit integer value
+      i16 = 4,   // This is a 16 bit integer value
+      i32 = 5,   // This is a 32 bit integer value
+      i64 = 6,   // This is a 64 bit integer value
+      i128 = 7,  // This is a 128 bit integer value
 
       FIRST_INTEGER_VALUETYPE = i1,
-      LAST_INTEGER_VALUETYPE  = i128,
+      LAST_INTEGER_VALUETYPE = i128,
 
-      bf16           =   8,   // This is a 16 bit brain floating point value
-      f16            =   9,   // This is a 16 bit floating point value
-      f32            =  10,   // This is a 32 bit floating point value
-      f64            =  11,   // This is a 64 bit floating point value
-      f80            =  12,   // This is a 80 bit floating point value
-      f128           =  13,   // This is a 128 bit floating point value
-      ppcf128        =  14,   // This is a PPC 128-bit floating point value
+      bf16 = 8,     // This is a 16 bit brain floating point value
+      f16 = 9,      // This is a 16 bit floating point value
+      f32 = 10,     // This is a 32 bit floating point value
+      f64 = 11,     // This is a 64 bit floating point value
+      f80 = 12,     // This is a 80 bit floating point value
+      f128 = 13,    // This is a 128 bit floating point value
+      ppcf128 = 14, // This is a PPC 128-bit floating point value
 
       FIRST_FP_VALUETYPE = bf16,
-      LAST_FP_VALUETYPE  = ppcf128,
-
-      v1i1           =  15,   //    1 x i1
-      v2i1           =  16,   //    2 x i1
-      v4i1           =  17,   //    4 x i1
-      v8i1           =  18,   //    8 x i1
-      v16i1          =  19,   //   16 x i1
-      v32i1          =  20,   //   32 x i1
-      v64i1          =  21,   //   64 x i1
-      v128i1         =  22,   //  128 x i1
-      v256i1         =  23,   //  256 x i1
-      v512i1         =  24,   //  512 x i1
-      v1024i1        =  25,   // 1024 x i1
-
-      v1i8           =  26,   //  1 x i8
-      v2i8           =  27,   //  2 x i8
-      v4i8           =  28,   //  4 x i8
-      v8i8           =  29,   //  8 x i8
-      v16i8          =  30,   // 16 x i8
-      v32i8          =  31,   // 32 x i8
-      v64i8          =  32,   // 64 x i8
-      v128i8         =  33,   //128 x i8
-      v256i8         =  34,   //256 x i8
-
-      v1i16          =  35,   //  1 x i16
-      v2i16          =  36,   //  2 x i16
-      v3i16          =  37,   //  3 x i16
-      v4i16          =  38,   //  4 x i16
-      v8i16          =  39,   //  8 x i16
-      v16i16         =  40,   // 16 x i16
-      v32i16         =  41,   // 32 x i16
-      v64i16         =  42,   // 64 x i16
-      v128i16        =  43,   //128 x i16
-
-      v1i32          =  44,   //    1 x i32
-      v2i32          =  45,   //    2 x i32
-      v3i32          =  46,   //    3 x i32
-      v4i32          =  47,   //    4 x i32
-      v5i32          =  48,   //    5 x i32
-      v8i32          =  49,   //    8 x i32
-      v16i32         =  50,   //   16 x i32
-      v32i32         =  51,   //   32 x i32
-      v64i32         =  52,   //   64 x i32
-      v128i32        =  53,   //  128 x i32
-      v256i32        =  54,   //  256 x i32
-      v512i32        =  55,   //  512 x i32
-      v1024i32       =  56,   // 1024 x i32
-      v2048i32       =  57,   // 2048 x i32
-
-      v1i64          =  58,   //  1 x i64
-      v2i64          =  59,   //  2 x i64
-      v4i64          =  60,   //  4 x i64
-      v8i64          =  61,   //  8 x i64
-      v16i64         =  62,   // 16 x i64
-      v32i64         =  63,   // 32 x i64
-      v64i64         =  64,   // 64 x i64
-      v128i64        =  65,   // 128 x i64
-      v256i64        =  66,   // 256 x i64
-
-      v1i128         =  67,   //  1 x i128
+      LAST_FP_VALUETYPE = ppcf128,
+
+      v1i1 = 15,    //    1 x i1
+      v2i1 = 16,    //    2 x i1
+      v4i1 = 17,    //    4 x i1
+      v8i1 = 18,    //    8 x i1
+      v16i1 = 19,   //   16 x i1
+      v32i1 = 20,   //   32 x i1
+      v64i1 = 21,   //   64 x i1
+      v128i1 = 22,  //  128 x i1
+      v256i1 = 23,  //  256 x i1
+      v512i1 = 24,  //  512 x i1
+      v1024i1 = 25, // 1024 x i1
+
+      v1i8 = 26,   //  1 x i8
+      v2i8 = 27,   //  2 x i8
+      v4i8 = 28,   //  4 x i8
+      v8i8 = 29,   //  8 x i8
+      v16i8 = 30,  // 16 x i8
+      v32i8 = 31,  // 32 x i8
+      v64i8 = 32,  // 64 x i8
+      v128i8 = 33, // 128 x i8
+      v256i8 = 34, // 256 x i8
+
+      v1i16 = 35,   //  1 x i16
+      v2i16 = 36,   //  2 x i16
+      v3i16 = 37,   //  3 x i16
+      v4i16 = 38,   //  4 x i16
+      v8i16 = 39,   //  8 x i16
+      v16i16 = 40,  // 16 x i16
+      v32i16 = 41,  // 32 x i16
+      v64i16 = 42,  // 64 x i16
+      v128i16 = 43, // 128 x i16
+
+      v1i32 = 44,    //    1 x i32
+      v2i32 = 45,    //    2 x i32
+      v3i32 = 46,    //    3 x i32
+      v4i32 = 47,    //    4 x i32
+      v5i32 = 48,    //    5 x i32
+      v8i32 = 49,    //    8 x i32
+      v16i32 = 50,   //   16 x i32
+      v32i32 = 51,   //   32 x i32
+      v64i32 = 52,   //   64 x i32
+      v128i32 = 53,  //  128 x i32
+      v256i32 = 54,  //  256 x i32
+      v512i32 = 55,  //  512 x i32
+      v1024i32 = 56, // 1024 x i32
+      v2048i32 = 57, // 2048 x i32
+
+      v1i64 = 58,   //  1 x i64
+      v2i64 = 59,   //  2 x i64
+      v4i64 = 60,   //  4 x i64
+      v8i64 = 61,   //  8 x i64
+      v16i64 = 62,  // 16 x i64
+      v32i64 = 63,  // 32 x i64
+      v64i64 = 64,  // 64 x i64
+      v128i64 = 65, // 128 x i64
+      v256i64 = 66, // 256 x i64
+
+      v1i128 = 67, //  1 x i128
 
       FIRST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE = v1i1,
       LAST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE = v1i128,
 
-      v2f16          =  68,   //    2 x f16
-      v3f16          =  69,   //    3 x f16
-      v4f16          =  70,   //    4 x f16
-      v8f16          =  71,   //    8 x f16
-      v16f16         =  72,   //   16 x f16
-      v32f16         =  73,   //   32 x f16
-      v64f16         =  74,   //   64 x f16
-      v128f16        =  75,   //  128 x f16
-      v2bf16         =  76,   //    2 x bf16
-      v3bf16         =  77,   //    3 x bf16
-      v4bf16         =  78,   //    4 x bf16
-      v8bf16         =  79,   //    8 x bf16
-      v16bf16        =  80,   //   16 x bf16
-      v32bf16        =  81,   //   32 x bf16
-      v64bf16        =  82,   //   64 x bf16
-      v128bf16       =  83,   //  128 x bf16
-      v1f32          =  84,   //    1 x f32
-      v2f32          =  85,   //    2 x f32
-      v3f32          =  86,   //    3 x f32
-      v4f32          =  87,   //    4 x f32
-      v5f32          =  88,   //    5 x f32
-      v8f32          =  89,   //    8 x f32
-      v16f32         =  90,   //   16 x f32
-      v32f32         =  91,   //   32 x f32
-      v64f32         =  92,   //   64 x f32
-      v128f32        =  93,   //  128 x f32
-      v256f32        =  94,   //  256 x f32
-      v512f32        =  95,   //  512 x f32
-      v1024f32       =  96,   // 1024 x f32
-      v2048f32       =  97,   // 2048 x f32
-      v1f64          =  98,   //    1 x f64
-      v2f64          =  99,   //    2 x f64
-      v4f64          = 100,   //    4 x f64
-      v8f64          = 101,   //    8 x f64
-      v16f64         = 102,   //   16 x f64
-      v32f64         = 103,   //   32 x f64
-      v64f64         = 104,   //   64 x f64
-      v128f64        = 105,   //  128 x f64
-      v256f64        = 106,   //  256 x f64
+      v2f16 = 68,    //    2 x f16
+      v3f16 = 69,    //    3 x f16
+      v4f16 = 70,    //    4 x f16
+      v8f16 = 71,    //    8 x f16
+      v16f16 = 72,   //   16 x f16
+      v32f16 = 73,   //   32 x f16
+      v64f16 = 74,   //   64 x f16
+      v128f16 = 75,  //  128 x f16
+      v2bf16 = 76,   //    2 x bf16
+      v3bf16 = 77,   //    3 x bf16
+      v4bf16 = 78,   //    4 x bf16
+      v8bf16 = 79,   //    8 x bf16
+      v16bf16 = 80,  //   16 x bf16
+      v32bf16 = 81,  //   32 x bf16
+      v64bf16 = 82,  //   64 x bf16
+      v128bf16 = 83, //  128 x bf16
+      v1f32 = 84,    //    1 x f32
+      v2f32 = 85,    //    2 x f32
+      v3f32 = 86,    //    3 x f32
+      v4f32 = 87,    //    4 x f32
+      v5f32 = 88,    //    5 x f32
+      v8f32 = 89,    //    8 x f32
+      v16f32 = 90,   //   16 x f32
+      v32f32 = 91,   //   32 x f32
+      v64f32 = 92,   //   64 x f32
+      v128f32 = 93,  //  128 x f32
+      v256f32 = 94,  //  256 x f32
+      v512f32 = 95,  //  512 x f32
+      v1024f32 = 96, // 1024 x f32
+      v2048f32 = 97, // 2048 x f32
+      v1f64 = 98,    //    1 x f64
+      v2f64 = 99,    //    2 x f64
+      v4f64 = 100,   //    4 x f64
+      v8f64 = 101,   //    8 x f64
+      v16f64 = 102,  //   16 x f64
+      v32f64 = 103,  //   32 x f64
+      v64f64 = 104,  //   64 x f64
+      v128f64 = 105, //  128 x f64
+      v256f64 = 106, //  256 x f64
 
       FIRST_FP_FIXEDLEN_VECTOR_VALUETYPE = v2f16,
       LAST_FP_FIXEDLEN_VECTOR_VALUETYPE = v256f64,
@@ -166,64 +166,64 @@
       FIRST_FIXEDLEN_VECTOR_VALUETYPE = v1i1,
       LAST_FIXEDLEN_VECTOR_VALUETYPE = v256f64,
 
-      nxv1i1         = 107,   // n x  1 x i1
-      nxv2i1         = 108,   // n x  2 x i1
-      nxv4i1         = 109,   // n x  4 x i1
-      nxv8i1         = 110,   // n x  8 x i1
-      nxv16i1        = 111,   // n x 16 x i1
-      nxv32i1        = 112,   // n x 32 x i1
-      nxv64i1        = 113,   // n x  64 x i1
-
-      nxv1i8         = 114,   // n x  1 x i8
-      nxv2i8         = 115,   // n x  2 x i8
-      nxv4i8         = 116,   // n x  4 x i8
-      nxv8i8         = 117,   // n x  8 x i8
-      nxv16i8        = 118,   // n x 16 x i8
-      nxv32i8        = 119,   // n x 32 x i8
-      nxv64i8        = 120,   // n x  64 x i8
-
-      nxv1i16        = 121,  // n x  1 x i16
-      nxv2i16        = 122,  // n x  2 x i16
-      nxv4i16        = 123,  // n x  4 x i16
-      nxv8i16        = 124,  // n x  8 x i16
-      nxv16i16       = 125,  // n x 16 x i16
-      nxv32i16       = 126,  // n x 32 x i16
-
-      nxv1i32        = 127,  // n x  1 x i32
-      nxv2i32        = 128,  // n x  2 x i32
-      nxv4i32        = 129,  // n x  4 x i32
-      nxv8i32        = 130,  // n x  8 x i32
-      nxv16i32       = 131,  // n x 16 x i32
-      nxv32i32       = 132,  // n x 32 x i32
-
-      nxv1i64        = 133,  // n x  1 x i64
-      nxv2i64        = 134,  // n x  2 x i64
-      nxv4i64        = 135,  // n x  4 x i64
-      nxv8i64        = 136,  // n x  8 x i64
-      nxv16i64       = 137,  // n x 16 x i64
-      nxv32i64       = 138,  // n x 32 x i64
+      nxv1i1 = 107,  // n x  1 x i1
+      nxv2i1 = 108,  // n x  2 x i1
+      nxv4i1 = 109,  // n x  4 x i1
+      nxv8i1 = 110,  // n x  8 x i1
+      nxv16i1 = 111, // n x 16 x i1
+      nxv32i1 = 112, // n x 32 x i1
+      nxv64i1 = 113, // n x  64 x i1
+
+      nxv1i8 = 114,  // n x  1 x i8
+      nxv2i8 = 115,  // n x  2 x i8
+      nxv4i8 = 116,  // n x  4 x i8
+      nxv8i8 = 117,  // n x  8 x i8
+      nxv16i8 = 118, // n x 16 x i8
+      nxv32i8 = 119, // n x 32 x i8
+      nxv64i8 = 120, // n x  64 x i8
+
+      nxv1i16 = 121,  // n x  1 x i16
+      nxv2i16 = 122,  // n x  2 x i16
+      nxv4i16 = 123,  // n x  4 x i16
+      nxv8i16 = 124,  // n x  8 x i16
+      nxv16i16 = 125, // n x 16 x i16
+      nxv32i16 = 126, // n x 32 x i16
+
+      nxv1i32 = 127,  // n x  1 x i32
+      nxv2i32 = 128,  // n x  2 x i32
+      nxv4i32 = 129,  // n x  4 x i32
+      nxv8i32 = 130,  // n x  8 x i32
+      nxv16i32 = 131, // n x 16 x i32
+      nxv32i32 = 132, // n x 32 x i32
+
+      nxv1i64 = 133,  // n x  1 x i64
+      nxv2i64 = 134,  // n x  2 x i64
+      nxv4i64 = 135,  // n x  4 x i64
+      nxv8i64 = 136,  // n x  8 x i64
+      nxv16i64 = 137, // n x 16 x i64
+      nxv32i64 = 138, // n x 32 x i64
 
       FIRST_INTEGER_SCALABLE_VECTOR_VALUETYPE = nxv1i1,
       LAST_INTEGER_SCALABLE_VECTOR_VALUETYPE = nxv32i64,
 
-      nxv1f16        = 139,   // n x   1 x f16
-      nxv2f16        = 140,  // n x  2 x f16
-      nxv4f16        = 141,  // n x  4 x f16
-      nxv8f16        = 142,  // n x  8 x f16
-      nxv16f16       = 143,   // n x  16 x f16
-      nxv32f16       = 144,   // n x  32 x f16
-      nxv2bf16       = 145,  // n x  2 x bf16
-      nxv4bf16       = 146,  // n x  4 x bf16
-      nxv8bf16       = 147,  // n x  8 x bf16
-      nxv1f32        = 148,  // n x  1 x f32
-      nxv2f32        = 149,  // n x  2 x f32
-      nxv4f32        = 150,  // n x  4 x f32
-      nxv8f32        = 151,  // n x  8 x f32
-      nxv16f32       = 152,  // n x 16 x f32
-      nxv1f64        = 153,  // n x  1 x f64
-      nxv2f64        = 154,  // n x  2 x f64
-      nxv4f64        = 155,  // n x  4 x f64
-      nxv8f64        = 156,  // n x  8 x f64
+      nxv1f16 = 139,  // n x   1 x f16
+      nxv2f16 = 140,  // n x  2 x f16
+      nxv4f16 = 141,  // n x  4 x f16
+      nxv8f16 = 142,  // n x  8 x f16
+      nxv16f16 = 143, // n x  16 x f16
+      nxv32f16 = 144, // n x  32 x f16
+      nxv2bf16 = 145, // n x  2 x bf16
+      nxv4bf16 = 146, // n x  4 x bf16
+      nxv8bf16 = 147, // n x  8 x bf16
+      nxv1f32 = 148,  // n x  1 x f32
+      nxv2f32 = 149,  // n x  2 x f32
+      nxv4f32 = 150,  // n x  4 x f32
+      nxv8f32 = 151,  // n x  8 x f32
+      nxv16f32 = 152, // n x 16 x f32
+      nxv1f64 = 153,  // n x  1 x f64
+      nxv2f64 = 154,  // n x  2 x f64
+      nxv4f64 = 155,  // n x  4 x f64
+      nxv8f64 = 156,  // n x  8 x f64
 
       FIRST_FP_SCALABLE_VECTOR_VALUETYPE = nxv1f16,
       LAST_FP_SCALABLE_VECTOR_VALUETYPE = nxv8f64,
@@ -232,25 +232,24 @@
       LAST_SCALABLE_VECTOR_VALUETYPE = nxv8f64,
 
       FIRST_VECTOR_VALUETYPE = v1i1,
-      LAST_VECTOR_VALUETYPE  = nxv8f64,
+      LAST_VECTOR_VALUETYPE = nxv8f64,
 
-      x86mmx         = 157,   // This is an X86 MMX value
+      x86mmx = 157, // This is an X86 MMX value
 
-      Glue           = 158,   // This glues nodes together during pre-RA sched
+      Glue = 158, // This glues nodes together during pre-RA sched
 
-      isVoid         = 159,   // This has no value
+      isVoid = 159, // This has no value
 
-      Untyped        = 160,   // This value takes a register, but has
-                              // unspecified type.  The register class
-                              // will be determined by the opcode.
+      Untyped = 160, // This value takes a register, but has
+                     // unspecified type.  The register class
+                     // will be determined by the opcode.
 
-      exnref         = 161,   // WebAssembly's exnref type
-      funcref        = 162,   // WebAssembly's funcref type
-      externref      = 163,   // WebAssembly's externref type
-      x86amx         = 164,   // This is an X86 AMX value
+      funcref = 161,   // WebAssembly's funcref type
+      externref = 162, // WebAssembly's externref type
+      x86amx = 163,    // This is an X86 AMX value
 
-      FIRST_VALUETYPE =  1,   // This is always the beginning of the list.
-      LAST_VALUETYPE = 165,   // This always remains at the end of the list.
+      FIRST_VALUETYPE = 1,  // This is always the beginning of the list.
+      LAST_VALUETYPE = 164, // This always remains at the end of the list.
 
       // This is the current maximum for LAST_VALUETYPE.
       // MVT::MAX_ALLOWED_VALUETYPE is used for asserts and to size bit vectors
@@ -258,38 +257,38 @@
       MAX_ALLOWED_VALUETYPE = 192,
 
       // A value of type llvm::TokenTy
-      token          = 248,
+      token = 248,
 
       // This is MDNode or MDString.
-      Metadata       = 249,
+      Metadata = 249,
 
       // An int value the size of the pointer of the current
       // target to any address space. This must only be used internal to
       // tblgen. Other than for overloading, we treat iPTRAny the same as iPTR.
-      iPTRAny        = 250,
+      iPTRAny = 250,
 
       // A vector with any length and element size. This is used
       // for intrinsics that have overloadings based on vector types.
       // This is only for tblgen's consumption!
-      vAny           = 251,
+      vAny = 251,
 
       // Any floating-point or vector floating-point value. This is used
       // for intrinsics that have overloadings based on floating-point types.
       // This is only for tblgen's consumption!
-      fAny           = 252,
+      fAny = 252,
 
       // An integer or vector integer value of any bit width. This is
       // used for intrinsics that have overloadings based on integer bit widths.
       // This is only for tblgen's consumption!
-      iAny           = 253,
+      iAny = 253,
 
       // An int value the size of the pointer of the current
       // target.  This should only be used internal to tblgen!
-      iPTR           = 254,
+      iPTR = 254,
 
       // Any type. This is used for intrinsics that have overloadings.
       // This is only for tblgen's consumption!
-      Any            = 255
+      Any = 255
     };
 
     SimpleValueType SimpleTy = INVALID_SIMPLE_VALUE_TYPE;
@@ -977,7 +976,6 @@
       case v1024f32:  return TypeSize::Fixed(32768);
       case v2048i32:
       case v2048f32:  return TypeSize::Fixed(65536);
-      case exnref:
       case funcref:
       case externref: return TypeSize::Fixed(0); // opaque type
       }
diff --git a/llvm/lib/CodeGen/AsmPrinter/WasmException.cpp b/llvm/lib/CodeGen/AsmPrinter/WasmException.cpp
--- a/llvm/lib/CodeGen/AsmPrinter/WasmException.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/WasmException.cpp
@@ -18,11 +18,11 @@
 using namespace llvm;
 
 void WasmException::endModule() {
-  // This is the symbol used in 'throw' and 'br_on_exn' instruction to denote
-  // this is a C++ exception. This symbol has to be emitted somewhere once in
-  // the module.  Check if the symbol has already been created, i.e., we have at
-  // least one 'throw' or 'br_on_exn' instruction in the module, and emit the
-  // symbol only if so.
+  // This is the symbol used in 'throw' and 'catch' instruction to denote this
+  // is a C++ exception. This symbol has to be emitted somewhere once in the
+  // module.  Check if the symbol has already been created, i.e., we have at
+  // least one 'throw' or 'catch' instruction in the module, and emit the symbol
+  // only if so.
   SmallString<60> NameStr;
   Mangler::getNameWithPrefix(NameStr, "__cpp_exception", Asm->getDataLayout());
   if (Asm->OutContext.lookupSymbol(NameStr)) {
diff --git a/llvm/lib/CodeGen/ValueTypes.cpp b/llvm/lib/CodeGen/ValueTypes.cpp
--- a/llvm/lib/CodeGen/ValueTypes.cpp
+++ b/llvm/lib/CodeGen/ValueTypes.cpp
@@ -167,7 +167,6 @@
   case MVT::x86amx:    return "x86amx";
   case MVT::Metadata:  return "Metadata";
   case MVT::Untyped:   return "Untyped";
-  case MVT::exnref:    return "exnref";
   case MVT::funcref:   return "funcref";
   case MVT::externref: return "externref";
   }
diff --git a/llvm/lib/ObjectYAML/WasmYAML.cpp b/llvm/lib/ObjectYAML/WasmYAML.cpp
--- a/llvm/lib/ObjectYAML/WasmYAML.cpp
+++ b/llvm/lib/ObjectYAML/WasmYAML.cpp
@@ -572,7 +572,6 @@
   ECase(F64);
   ECase(V128);
   ECase(FUNCREF);
-  ECase(EXNREF);
   ECase(EXTERNREF);
   ECase(FUNC);
 #undef ECase
diff --git a/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp b/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
--- a/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
+++ b/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
@@ -322,8 +322,6 @@
         Type == "i32x4" || Type == "i64x2" || Type == "f32x4" ||
         Type == "f64x2")
       return wasm::ValType::V128;
-    if (Type == "exnref")
-      return wasm::ValType::EXNREF;
     if (Type == "funcref")
       return wasm::ValType::FUNCREF;
     if (Type == "externref")
@@ -341,7 +339,6 @@
         .Case("v128", WebAssembly::BlockType::V128)
         .Case("funcref", WebAssembly::BlockType::Funcref)
         .Case("externref", WebAssembly::BlockType::Externref)
-        .Case("exnref", WebAssembly::BlockType::Exnref)
         .Case("void", WebAssembly::BlockType::Void)
         .Default(WebAssembly::BlockType::Invalid);
   }
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp
--- a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp
+++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp
@@ -345,8 +345,6 @@
     return "externref";
   case wasm::WASM_TYPE_FUNC:
     return "func";
-  case wasm::WASM_TYPE_EXNREF:
-    return "exnref";
   case wasm::WASM_TYPE_NORESULT:
     return "void";
   default:
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
--- a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
+++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
@@ -140,7 +140,6 @@
   V128 = unsigned(wasm::ValType::V128),
   Externref = unsigned(wasm::ValType::EXTERNREF),
   Funcref = unsigned(wasm::ValType::FUNCREF),
-  Exnref = unsigned(wasm::ValType::EXNREF),
   // Multivalue blocks (and other non-void blocks) are only emitted when the
   // blocks will never be exited and are at the ends of functions (see
   // WebAssemblyCFGStackify::fixEndsAtEndOfFunction). They also are never made
@@ -326,8 +325,6 @@
   case WebAssembly::ARGUMENT_funcref_S:
   case WebAssembly::ARGUMENT_externref:
   case WebAssembly::ARGUMENT_externref_S:
-  case WebAssembly::ARGUMENT_exnref:
-  case WebAssembly::ARGUMENT_exnref_S:
     return true;
   default:
     return false;
@@ -350,8 +347,6 @@
   case WebAssembly::COPY_FUNCREF_S:
   case WebAssembly::COPY_EXTERNREF:
   case WebAssembly::COPY_EXTERNREF_S:
-  case WebAssembly::COPY_EXNREF:
-  case WebAssembly::COPY_EXNREF_S:
     return true;
   default:
     return false;
@@ -374,8 +369,6 @@
   case WebAssembly::TEE_FUNCREF_S:
   case WebAssembly::TEE_EXTERNREF:
   case WebAssembly::TEE_EXTERNREF_S:
-  case WebAssembly::TEE_EXNREF:
-  case WebAssembly::TEE_EXNREF_S:
     return true;
   default:
     return false;
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
--- a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
+++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
@@ -151,8 +151,6 @@
     return wasm::ValType::FUNCREF;
   case MVT::externref:
     return wasm::ValType::EXTERNREF;
-  case MVT::exnref:
-    return wasm::ValType::EXNREF;
   default:
     llvm_unreachable("unexpected type");
   }
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
--- a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
@@ -119,8 +119,6 @@
     return 'd';
   case wasm::ValType::V128:
     return 'V';
-  case wasm::ValType::EXNREF:
-    return 'E';
   case wasm::ValType::FUNCREF:
     return 'F';
   case wasm::ValType::EXTERNREF:
@@ -463,14 +461,6 @@
     // This is a compiler barrier that prevents instruction reordering during
     // backend compilation, and should not be emitted.
     break;
-  case WebAssembly::EXTRACT_EXCEPTION_I32:
-  case WebAssembly::EXTRACT_EXCEPTION_I32_S:
-    // These are pseudo instructions that simulates popping values from stack.
-    // We print these only when we have -wasm-keep-registers on for assembly
-    // readability.
-    if (!WasmKeepRegisters)
-      break;
-    LLVM_FALLTHROUGH;
   default: {
     WebAssemblyMCInstLower MCInstLowering(OutContext, *this);
     MCInst TmpInst;
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
--- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
@@ -242,20 +242,12 @@
   // which reduces overall stack height.
   MachineBasicBlock *Header = nullptr;
   bool IsBranchedTo = false;
-  bool IsBrOnExn = false;
-  MachineInstr *BrOnExn = nullptr;
   int MBBNumber = MBB.getNumber();
   for (MachineBasicBlock *Pred : MBB.predecessors()) {
     if (Pred->getNumber() < MBBNumber) {
       Header = Header ? MDT.findNearestCommonDominator(Header, Pred) : Pred;
-      if (explicitlyBranchesTo(Pred, &MBB)) {
+      if (explicitlyBranchesTo(Pred, &MBB))
         IsBranchedTo = true;
-        if (Pred->getFirstTerminator()->getOpcode() == WebAssembly::BR_ON_EXN) {
-          IsBrOnExn = true;
-          assert(!BrOnExn && "There should be only one br_on_exn per block");
-          BrOnExn = &*Pred->getFirstTerminator();
-        }
-      }
     }
   }
   if (!Header)
@@ -340,22 +332,7 @@
   }
 
   // Add the BLOCK.
-
-  // 'br_on_exn' extracts exnref object and pushes variable number of values
-  // depending on its tag. For C++ exception, its a single i32 value, and the
-  // generated code will be in the form of:
-  // block i32
-  //   br_on_exn 0, $__cpp_exception
-  //   rethrow
-  // end_block
   WebAssembly::BlockType ReturnType = WebAssembly::BlockType::Void;
-  if (IsBrOnExn) {
-    const char *TagName = BrOnExn->getOperand(1).getSymbolName();
-    if (std::strcmp(TagName, "__cpp_exception") != 0)
-      llvm_unreachable("Only C++ exception is supported");
-    ReturnType = WebAssembly::BlockType::I32;
-  }
-
   auto InsertPos = getLatestInsertPos(Header, BeforeSet, AfterSet);
   MachineInstr *Begin =
       BuildMI(*Header, InsertPos, Header->findDebugLoc(InsertPos),
@@ -776,8 +753,6 @@
     return WebAssembly::COPY_FUNCREF;
   if (RC == &WebAssembly::EXTERNREFRegClass)
     return WebAssembly::COPY_EXTERNREF;
-  if (RC == &WebAssembly::EXNREFRegClass)
-    return WebAssembly::COPY_EXNREF;
   llvm_unreachable("Unexpected register class");
 }
 
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
--- a/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
@@ -100,8 +100,6 @@
     return WebAssembly::DROP_FUNCREF;
   if (RC == &WebAssembly::EXTERNREFRegClass)
     return WebAssembly::DROP_EXTERNREF;
-  if (RC == &WebAssembly::EXNREFRegClass)
-    return WebAssembly::DROP_EXNREF;
   llvm_unreachable("Unexpected register class");
 }
 
@@ -117,8 +115,6 @@
     return WebAssembly::LOCAL_GET_F64;
   if (RC == &WebAssembly::V128RegClass)
     return WebAssembly::LOCAL_GET_V128;
-  if (RC == &WebAssembly::EXNREFRegClass)
-    return WebAssembly::LOCAL_GET_EXNREF;
   if (RC == &WebAssembly::FUNCREFRegClass)
     return WebAssembly::LOCAL_GET_FUNCREF;
   if (RC == &WebAssembly::EXTERNREFRegClass)
@@ -138,8 +134,6 @@
     return WebAssembly::LOCAL_SET_F64;
   if (RC == &WebAssembly::V128RegClass)
     return WebAssembly::LOCAL_SET_V128;
-  if (RC == &WebAssembly::EXNREFRegClass)
-    return WebAssembly::LOCAL_SET_EXNREF;
   if (RC == &WebAssembly::FUNCREFRegClass)
     return WebAssembly::LOCAL_SET_FUNCREF;
   if (RC == &WebAssembly::EXTERNREFRegClass)
@@ -159,8 +153,6 @@
     return WebAssembly::LOCAL_TEE_F64;
   if (RC == &WebAssembly::V128RegClass)
     return WebAssembly::LOCAL_TEE_V128;
-  if (RC == &WebAssembly::EXNREFRegClass)
-    return WebAssembly::LOCAL_TEE_EXNREF;
   if (RC == &WebAssembly::FUNCREFRegClass)
     return WebAssembly::LOCAL_TEE_FUNCREF;
   if (RC == &WebAssembly::EXTERNREFRegClass)
@@ -180,8 +172,6 @@
     return MVT::f64;
   if (RC == &WebAssembly::V128RegClass)
     return MVT::v16i8;
-  if (RC == &WebAssembly::EXNREFRegClass)
-    return MVT::exnref;
   if (RC == &WebAssembly::FUNCREFRegClass)
     return MVT::funcref;
   if (RC == &WebAssembly::EXTERNREFRegClass)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
--- a/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
@@ -128,7 +128,6 @@
     case MVT::i64:
     case MVT::f32:
     case MVT::f64:
-    case MVT::exnref:
     case MVT::funcref:
     case MVT::externref:
       return VT;
@@ -714,10 +713,6 @@
       Opc = WebAssembly::ARGUMENT_externref;
       RC = &WebAssembly::EXTERNREFRegClass;
       break;
-    case MVT::exnref:
-      Opc = WebAssembly::ARGUMENT_exnref;
-      RC = &WebAssembly::EXNREFRegClass;
-      break;
     default:
       return false;
     }
@@ -816,9 +811,6 @@
     case MVT::v2f64:
       ResultReg = createResultReg(&WebAssembly::V128RegClass);
       break;
-    case MVT::exnref:
-      ResultReg = createResultReg(&WebAssembly::EXNREFRegClass);
-      break;
     case MVT::funcref:
       ResultReg = createResultReg(&WebAssembly::FUNCREFRegClass);
       break;
@@ -932,10 +924,6 @@
     Opc = WebAssembly::SELECT_F64;
     RC = &WebAssembly::F64RegClass;
     break;
-  case MVT::exnref:
-    Opc = WebAssembly::SELECT_EXNREF;
-    RC = &WebAssembly::EXNREFRegClass;
-    break;
   case MVT::funcref:
     Opc = WebAssembly::SELECT_FUNCREF;
     RC = &WebAssembly::FUNCREFRegClass;
@@ -1347,7 +1335,6 @@
   case MVT::v2f64:
   case MVT::funcref:
   case MVT::externref:
-  case MVT::exnref:
     break;
   default:
     return false;
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
@@ -145,7 +145,7 @@
 
 // Catching an exception: catch / catch_all
 let hasCtrlDep = 1, hasSideEffects = 1 in {
-// TODO Currently 'catch' can only extract an i32, which is sufficient for C++
+// Currently 'catch' can only extract an i32, which is sufficient for C++
 // support, but according to the spec 'catch' can extract any number of values
 // based on the event type.
 defm CATCH : I<(outs I32:$dst), (ins event_op:$tag),
@@ -156,21 +156,6 @@
 defm CATCH_ALL : NRI<(outs), (ins), [], "catch_all", 0x05>;
 }
 
-// Querying / extracing exception: br_on_exn
-// br_on_exn queries an exnref to see if it matches the corresponding exception
-// tag index. If true it branches to the given label and pushes the
-// corresponding argument values of the exception onto the stack.
-let isBranch = 1, isTerminator = 1, hasCtrlDep = 1 in
-defm BR_ON_EXN : I<(outs), (ins bb_op:$dst, event_op:$tag, EXNREF:$exn),
-                   (outs), (ins bb_op:$dst, event_op:$tag), [],
-                   "br_on_exn \t$dst, $tag, $exn", "br_on_exn \t$dst, $tag",
-                   0x0a>;
-// This is a pseudo instruction that simulates popping a value from stack, which
-// has been pushed by br_on_exn
-let isCodeGenOnly = 1, hasSideEffects = 1 in
-defm EXTRACT_EXCEPTION_I32 : NRI<(outs I32:$dst), (ins), [],
-                                 "extract_exception\t$dst">;
-
 // Pseudo instructions: cleanupret / catchret
 let isTerminator = 1, hasSideEffects = 1, isBarrier = 1, hasCtrlDep = 1,
     isPseudo = 1, isEHScopeReturn = 1 in {
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp
@@ -80,8 +80,6 @@
     CopyOpcode = WebAssembly::COPY_FUNCREF;
   else if (RC == &WebAssembly::EXTERNREFRegClass)
     CopyOpcode = WebAssembly::COPY_EXTERNREF;
-  else if (RC == &WebAssembly::EXNREFRegClass)
-    CopyOpcode = WebAssembly::COPY_EXNREF;
   else
     llvm_unreachable("Unexpected register class");
 
@@ -143,14 +141,6 @@
       else
         FBB = MI.getOperand(0).getMBB();
       break;
-    case WebAssembly::BR_ON_EXN:
-      if (HaveCond)
-        return true;
-      Cond.push_back(MachineOperand::CreateImm(true));
-      Cond.push_back(MI.getOperand(2));
-      TBB = MI.getOperand(0).getMBB();
-      HaveCond = true;
-      break;
     }
     if (MI.isBarrier())
       break;
@@ -196,24 +186,10 @@
 
   assert(Cond.size() == 2 && "Expected a flag and a successor block");
 
-  MachineFunction &MF = *MBB.getParent();
-  auto &MRI = MF.getRegInfo();
-  bool IsBrOnExn = Cond[1].isReg() && MRI.getRegClass(Cond[1].getReg()) ==
-                                          &WebAssembly::EXNREFRegClass;
-
-  if (Cond[0].getImm()) {
-    if (IsBrOnExn) {
-      const char *CPPExnSymbol = MF.createExternalSymbolName("__cpp_exception");
-      BuildMI(&MBB, DL, get(WebAssembly::BR_ON_EXN))
-          .addMBB(TBB)
-          .addExternalSymbol(CPPExnSymbol)
-          .add(Cond[1]);
-    } else
-      BuildMI(&MBB, DL, get(WebAssembly::BR_IF)).addMBB(TBB).add(Cond[1]);
-  } else {
-    assert(!IsBrOnExn && "br_on_exn does not have a reversed condition");
+  if (Cond[0].getImm())
+    BuildMI(&MBB, DL, get(WebAssembly::BR_IF)).addMBB(TBB).add(Cond[1]);
+  else
     BuildMI(&MBB, DL, get(WebAssembly::BR_UNLESS)).addMBB(TBB).add(Cond[1]);
-  }
   if (!FBB)
     return 1;
 
@@ -224,14 +200,6 @@
 bool WebAssemblyInstrInfo::reverseBranchCondition(
     SmallVectorImpl<MachineOperand> &Cond) const {
   assert(Cond.size() == 2 && "Expected a flag and a condition expression");
-
-  // br_on_exn's condition cannot be reversed
-  MachineFunction &MF = *Cond[1].getParent()->getParent()->getParent();
-  auto &MRI = MF.getRegInfo();
-  if (Cond[1].isReg() &&
-      MRI.getRegClass(Cond[1].getReg()) == &WebAssembly::EXNREFRegClass)
-    return true;
-
   Cond.front() = MachineOperand::CreateImm(!Cond.front().getImm());
   return false;
 }
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
@@ -247,7 +247,6 @@
 defm "": ARGUMENT<I64, i64>;
 defm "": ARGUMENT<F32, f32>;
 defm "": ARGUMENT<F64, f64>;
-defm "": ARGUMENT<EXNREF, exnref>;
 defm "": ARGUMENT<FUNCREF, funcref>;
 defm "": ARGUMENT<EXTERNREF, externref>;
 
@@ -319,7 +318,6 @@
 defm "" : LOCAL<F32>;
 defm "" : LOCAL<F64>;
 defm "" : LOCAL<V128>, Requires<[HasSIMD128]>;
-defm "" : LOCAL<EXNREF>, Requires<[HasExceptionHandling]>;
 defm "" : LOCAL<FUNCREF>, Requires<[HasReferenceTypes]>;
 defm "" : LOCAL<EXTERNREF>, Requires<[HasReferenceTypes]>;
 
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrRef.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrRef.td
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrRef.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrRef.td
@@ -30,9 +30,8 @@
 
 defm "" : REF_I<FUNCREF, funcref>;
 defm "" : REF_I<EXTERNREF, externref>;
-defm "" : REF_I<EXNREF, exnref>;
 
-foreach reg = [FUNCREF, EXTERNREF, EXNREF] in {
+foreach reg = [FUNCREF, EXTERNREF] in {
 def : Pat<(select (i32 (setne I32:$cond, 0)), reg:$lhs, reg:$rhs),
           (!cast<Instruction>("SELECT_"#reg) reg:$lhs, reg:$rhs, I32:$cond)>;
 def : Pat<(select (i32 (seteq I32:$cond, 0)), reg:$lhs, reg:$rhs),
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyPeephole.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyPeephole.cpp
--- a/llvm/lib/Target/WebAssembly/WebAssemblyPeephole.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyPeephole.cpp
@@ -117,9 +117,6 @@
       case WebAssembly::EXTERNREFRegClassID:
         CopyLocalOpc = WebAssembly::COPY_EXTERNREF;
         break;
-      case WebAssembly::EXNREFRegClassID:
-        CopyLocalOpc = WebAssembly::COPY_EXNREF;
-        break;
       default:
         llvm_unreachable("Unexpected register class for return operand");
       }
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
--- a/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
@@ -864,24 +864,6 @@
         if (WebAssembly::isArgument(DefI->getOpcode()))
           continue;
 
-        // Currently catch's return value register cannot be stackified, because
-        // the wasm LLVM backend currently does not support live-in values
-        // entering blocks, which is a part of multi-value proposal.
-        //
-        // Once we support live-in values of wasm blocks, this can be:
-        // catch                           ; push exnref value onto stack
-        // block exnref -> i32
-        // br_on_exn $__cpp_exception      ; pop the exnref value
-        // end_block
-        //
-        // But because we don't support it yet, the catch instruction's dst
-        // register should be assigned to a local to be propagated across
-        // 'block' boundary now.
-        //
-        // TODO: Fix this once we support the multivalue blocks
-        if (DefI->getOpcode() == WebAssembly::CATCH)
-          continue;
-
         MachineOperand *Def = DefI->findRegisterDefOperand(Reg);
         assert(Def != nullptr);
 
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.td b/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.td
--- a/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.td
@@ -43,7 +43,6 @@
 
 def V128_0: WebAssemblyReg<"%v128">;
 
-def EXNREF_0 : WebAssemblyReg<"%exnref.0">;
 def FUNCREF_0 : WebAssemblyReg<"%funcref.0">;
 def EXTERNREF_0 : WebAssemblyReg<"%externref.0">;
 
@@ -66,6 +65,5 @@
 def F64 : WebAssemblyRegClass<[f64], 64, (add F64_0)>;
 def V128 : WebAssemblyRegClass<[v4f32, v2f64, v2i64, v4i32, v16i8, v8i16], 128,
                                (add V128_0)>;
-def EXNREF : WebAssemblyRegClass<[exnref], 0, (add EXNREF_0)>;
 def FUNCREF : WebAssemblyRegClass<[funcref], 0, (add FUNCREF_0)>;
 def EXTERNREF : WebAssemblyRegClass<[externref], 0, (add EXTERNREF_0)>;
diff --git a/llvm/test/CodeGen/WebAssembly/reg-argument.mir b/llvm/test/CodeGen/WebAssembly/reg-argument.mir
--- a/llvm/test/CodeGen/WebAssembly/reg-argument.mir
+++ b/llvm/test/CodeGen/WebAssembly/reg-argument.mir
@@ -47,13 +47,24 @@
     RETURN implicit-def $arguments
 ...
 ---
-name: argument_exnref
-# CHECK-LABEL: argument_exnref
+name: argument_funcref
+# CHECK-LABEL: argument_funcref
 body: |
   ; CHECK-LABEL: bb.0:
-  ; CHECK-NEXT: %1:exnref = ARGUMENT_exnref 0
+  ; CHECK-NEXT: %1:funcref = ARGUMENT_funcref 0
   bb.0:
     %0:i32 = CONST_I32 0, implicit-def $arguments
-    %1:exnref = ARGUMENT_exnref 0, implicit $arguments
+    %1:funcref = ARGUMENT_funcref 0, implicit $arguments
+    RETURN implicit-def $arguments
+...
+---
+name: argument_externref
+# CHECK-LABEL: argument_externref
+body: |
+  ; CHECK-LABEL: bb.0:
+  ; CHECK-NEXT: %1:externref = ARGUMENT_externref 0
+  bb.0:
+    %0:i32 = CONST_I32 0, implicit-def $arguments
+    %1:externref = ARGUMENT_externref 0, implicit $arguments
     RETURN implicit-def $arguments
 ...
diff --git a/llvm/test/CodeGen/WebAssembly/reg-copy.mir b/llvm/test/CodeGen/WebAssembly/reg-copy.mir
--- a/llvm/test/CodeGen/WebAssembly/reg-copy.mir
+++ b/llvm/test/CodeGen/WebAssembly/reg-copy.mir
@@ -56,13 +56,24 @@
     RETURN implicit-def $arguments
 ...
 ---
-name: copy_exnref
-# CHECK-LABEL: copy_exnref
+name: copy_funcref
+# CHECK-LABEL: copy_funcref
 body: |
   ; CHECK-LABEL: bb.0:
-  ; CHECK-NEXT: %0:exnref = COPY_EXNREF %1:exnref
+  ; CHECK-NEXT: %0:funcref = COPY_FUNCREF %1:funcref
   ; CHECK-NEXT: RETURN
   bb.0:
-    %0:exnref = COPY %1:exnref
+    %0:funcref = COPY %1:funcref
+    RETURN implicit-def $arguments
+...
+---
+name: copy_externref
+# CHECK-LABEL: copy_externref
+body: |
+  ; CHECK-LABEL: bb.0:
+  ; CHECK-NEXT: %0:externref = COPY_EXTERNREF %1:externref
+  ; CHECK-NEXT: RETURN
+  bb.0:
+    %0:externref = COPY %1:externref
     RETURN implicit-def $arguments
 ...
diff --git a/llvm/test/MC/Disassembler/WebAssembly/wasm.txt b/llvm/test/MC/Disassembler/WebAssembly/wasm.txt
--- a/llvm/test/MC/Disassembler/WebAssembly/wasm.txt
+++ b/llvm/test/MC/Disassembler/WebAssembly/wasm.txt
@@ -23,7 +23,6 @@
 0x11 0x80 0x01 0x00
 
 # CHECK: call 0
-# CHECK-NOT: exnref.call 0
 0x10 0x00
 
 # CHECK: local.get 128
@@ -55,6 +54,3 @@
 # This can mean end_block/end_loop/end_if/end_function/end_try..
 # CHECK: end
 0x0B
-
-# CHECK: br_on_exn 0, 0
-0x0A 0x00 0x00
diff --git a/llvm/test/MC/WebAssembly/objdump.s b/llvm/test/MC/WebAssembly/objdump.s
--- a/llvm/test/MC/WebAssembly/objdump.s
+++ b/llvm/test/MC/WebAssembly/objdump.s
@@ -9,7 +9,7 @@
 
 test1:
     .functype   test1 (i32, i64) -> (i32)
-    .local      i32, i64, exnref
+    .local      i32, i64, funcref
     local.get   3
     end_function
 
@@ -21,6 +21,6 @@
 # CHECK-NEXT:       9:       20 02  local.get	2
 # CHECK-NEXT:       b:       0b     end
 # CHECK-LABEL: <test1>:
-# CHECK-NEXT:        .local  i32, i64, exnref
+# CHECK-NEXT:        .local  i32, i64, funcref
 # CHECK-NEXT:      14:       20 03  local.get	3
 # CHECK-NEXT:      16:       0b     end
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp
--- a/llvm/utils/TableGen/CodeGenTarget.cpp
+++ b/llvm/utils/TableGen/CodeGenTarget.cpp
@@ -226,7 +226,6 @@
   case MVT::iPTR:      return "MVT::iPTR";
   case MVT::iPTRAny:   return "MVT::iPTRAny";
   case MVT::Untyped:   return "MVT::Untyped";
-  case MVT::exnref:    return "MVT::exnref";
   case MVT::funcref:   return "MVT::funcref";
   case MVT::externref: return "MVT::externref";
   default: llvm_unreachable("ILLEGAL VALUE TYPE!");