anchor.diff:            ENDIF
           END SUBROUTINE
   
  +        ! Non-dispatched matrix multiplication using BLAS (single-precision).
  +        !DIR$ ATTRIBUTES OFFLOAD:MIC :: libxsmm_sblasmm_ab
  +        SUBROUTINE libxsmm_sblasmm_ab(                                  &
  +     &  m, n, k, a, b, c, salpha, sbeta, flags)
  +          INTEGER(LIBXSMM_INT_KIND), PARAMETER :: T = LIBXSMM_FLS_KIND
  +          INTEGER(LIBXSMM_INT_KIND), INTENT(IN) :: m, n, k
  +          REAL(T), INTENT(IN) :: a(:,:), b(:,:)
  +          REAL(T), INTENT(INOUT) :: c(:,:)
  +          REAL(T), INTENT(IN) :: salpha, sbeta
  +          INTEGER(LIBXSMM_INT_KIND), INTENT(IN), OPTIONAL :: flags
  +          CALL libxsmm_sblasmm(m, n, k, a, b, c,                        &
  +     &      MERGE(LIBXSMM_FLAGS, flags, .NOT.PRESENT(flags)),           &
  +     &      salpha, sbeta)
  +        END SUBROUTINE
  +
  +        ! Non-dispatched matrix multiplication using BLAS (single-precision).
  +        !DIR$ ATTRIBUTES OFFLOAD:MIC :: libxsmm_dblasmm_ab
  +        SUBROUTINE libxsmm_dblasmm_ab(                                  &
  +     &  m, n, k, a, b, c, dalpha, dbeta, flags)
  +          INTEGER(LIBXSMM_INT_KIND), PARAMETER :: T = LIBXSMM_FLD_KIND
  +          INTEGER(LIBXSMM_INT_KIND), INTENT(IN) :: m, n, k
  +          REAL(T), INTENT(IN) :: a(:,:), b(:,:)
  +          REAL(T), INTENT(INOUT) :: c(:,:)
  +          REAL(T), INTENT(IN) :: dalpha, dbeta
  +          INTEGER(LIBXSMM_INT_KIND), INTENT(IN), OPTIONAL :: flags
  +          CALL libxsmm_dblasmm(m, n, k, a, b, c,                        &
  +     &      MERGE(LIBXSMM_FLAGS, flags, .NOT.PRESENT(flags)),           &
  +     &      dalpha, dbeta)
  +        END SUBROUTINE
  +
           ! Dispatched matrix multiplication (single-precision).
           !DIR$ ATTRIBUTES OFFLOAD:MIC :: libxsmm_smm
           SUBROUTINE libxsmm_smm(                                         &
  -     &  flags, m, n, k, a, b, c, pa, pb, pc, alpha, beta)
  +     &  m, n, k, a, b, c, pa, pb, pc, flags, alpha, beta)
             INTEGER(LIBXSMM_INT_KIND), PARAMETER :: T = LIBXSMM_FLS_KIND
  -          INTEGER(LIBXSMM_INT_KIND), INTENT(IN) :: flags, m, n, k
  +          INTEGER(LIBXSMM_INT_KIND), INTENT(IN) :: m, n, k
             REAL(T), INTENT(IN) :: a(:,:), b(:,:)
             REAL(T), INTENT(INOUT) :: c(:,:)
             TYPE(C_PTR), INTENT(IN), VALUE, OPTIONAL :: pa, pb, pc
  +          INTEGER(LIBXSMM_INT_KIND), INTENT(IN), OPTIONAL :: flags
             REAL(T), INTENT(IN), OPTIONAL :: alpha, beta
             TYPE(LIBXSMM_SMM_FUNCTION) :: xmm
  +          INTEGER(LIBXSMM_INT_KIND) :: f
  +          f = MERGE(LIBXSMM_FLAGS, flags, .NOT.PRESENT(flags))
             IF (LIBXSMM_MAX_MNK.GE.(m * n * k)) THEN
               IF (PRESENT(pa).OR.PRESENT(pb).OR.PRESENT(pc)) THEN
  -              xmm = libxsmm_sfunction_all(                              &
  -     &          flags, m, n, k, 0, 0, 0, alpha, beta,                   &
  +              xmm = libxsmm_sfunction_abf(m, n, k, alpha, beta, f,      &
        &          MERGE(LIBXSMM_PREFETCH, LIBXSMM_PREFETCH_SIGNATURE,     &
        &              LIBXSMM_PREFETCH_NONE.NE.LIBXSMM_PREFETCH))
                 IF (libxsmm_savailable(xmm)) THEN
                   CALL libxsmm_scall_prf(xmm, a, b, c, pa, pb, pc)
                 ELSE
  -                CALL libxsmm_sblasmm(                                   &
  -     &            flags, m, n, k, a, b, c, alpha, beta)
  +                CALL libxsmm_sblasmm(m, n, k, a, b, c, f, alpha, beta)
                 ENDIF
               ELSE
  -              xmm = libxsmm_sfunction_ldx(flags, m, n, k, 0, 0, 0)
  +              xmm = libxsmm_sfunction_abf(m, n, k, alpha, beta, f)
                 IF (libxsmm_savailable(xmm)) THEN
                   CALL libxsmm_scall_abc(xmm, a, b, c)
                 ELSE
  -                CALL libxsmm_sblasmm(                                   &
  -     &            flags, m, n, k, a, b, c, alpha, beta)
  +                CALL libxsmm_sblasmm(m, n, k, a, b, c, f, alpha, beta)
                 ENDIF
               ENDIF
             ELSE
  -            CALL libxsmm_sblasmm(flags, m, n, k, a, b, c, alpha, beta)
  +            CALL libxsmm_sblasmm(m, n, k, a, b, c, f, alpha, beta)
             ENDIF
           END SUBROUTINE
   
           ! Dispatched matrix multiplication (double-precision).
           !DIR$ ATTRIBUTES OFFLOAD:MIC :: libxsmm_dmm
           SUBROUTINE libxsmm_dmm(                                         &
  -     &  flags, m, n, k, a, b, c, pa, pb, pc, alpha, beta)
  +     &  m, n, k, a, b, c, pa, pb, pc, flags, alpha, beta)
             INTEGER(LIBXSMM_INT_KIND), PARAMETER :: T = LIBXSMM_FLD_KIND
  -          INTEGER(LIBXSMM_INT_KIND), INTENT(IN) :: flags, m, n, k
  +          INTEGER(LIBXSMM_INT_KIND), INTENT(IN) :: m, n, k
             REAL(T), INTENT(IN) :: a(:,:), b(:,:)
             REAL(T), INTENT(INOUT) :: c(:,:)
             TYPE(C_PTR), INTENT(IN), VALUE, OPTIONAL :: pa, pb, pc
  +          INTEGER(LIBXSMM_INT_KIND), INTENT(IN), OPTIONAL :: flags
             REAL(T), INTENT(IN), OPTIONAL :: alpha, beta
             TYPE(LIBXSMM_DMM_FUNCTION) :: xmm
  +          INTEGER(LIBXSMM_INT_KIND) :: f
  +          f = MERGE(LIBXSMM_FLAGS, flags, .NOT.PRESENT(flags))
             IF (LIBXSMM_MAX_MNK.GE.(m * n * k)) THEN
               IF (PRESENT(pa).OR.PRESENT(pb).OR.PRESENT(pc)) THEN
  -              xmm = libxsmm_dfunction_all(                              &
  -     &          flags, m, n, k, 0, 0, 0, alpha, beta,                   &
  +              xmm = libxsmm_dfunction_abf(m, n, k, alpha, beta, f,      &
        &          MERGE(LIBXSMM_PREFETCH, LIBXSMM_PREFETCH_SIGNATURE,     &
        &              LIBXSMM_PREFETCH_NONE.NE.LIBXSMM_PREFETCH))
                 IF (libxsmm_davailable(xmm)) THEN
                   CALL libxsmm_dcall_prf(xmm, a, b, c, pa, pb, pc)
                 ELSE
  -                CALL libxsmm_dblasmm(                                   &
  -     &            flags, m, n, k, a, b, c, alpha, beta)
  +                CALL libxsmm_dblasmm(m, n, k, a, b, c, f, alpha, beta)
                 ENDIF
               ELSE
  -              xmm = libxsmm_dfunction_ldx(flags, m, n, k, 0, 0, 0)
  +              xmm = libxsmm_dfunction_abf(m, n, k, alpha, beta, f)
                 IF (libxsmm_davailable(xmm)) THEN
                   CALL libxsmm_dcall_abc(xmm, a, b, c)
                 ELSE
  -                CALL libxsmm_dblasmm(                                   &
  -     &            flags, m, n, k, a, b, c, alpha, beta)
  +                CALL libxsmm_dblasmm(m, n, k, a, b, c, f, alpha, beta)
                 ENDIF
               ENDIF
             ELSE
  -            CALL libxsmm_dblasmm(flags, m, n, k, a, b, c, alpha, beta)
  +            CALL libxsmm_dblasmm(m, n, k, a, b, c, f, alpha, beta)
             ENDIF
           END SUBROUTINE
         END MODULE
  
positive.code:           ELSE
              CALL sgemm(                                                 &
       &        MERGE('N', 'T',                                           &
       &            0.EQ.IAND(LIBXSMM_GEMM_FLAG_TRANS_A, flags)),         &
       &        MERGE('N', 'T',                                           &
       &            0.EQ.IAND(LIBXSMM_GEMM_FLAG_TRANS_B, flags)),         &
       &        n, m, k,                                                  &
       &        MERGE(REAL(LIBXSMM_ALPHA, T), alpha, .NOT.PRESENT(alpha)),&
       &        b, MAX(SIZE(b, 2), n), a, MAX(SIZE(a, 2), k),             &
  
negative.code:               REAL(LIBXSMM_FLD_KIND), INTENT(INOUT) :: c(ldc,*)
              END SUBROUTINE
            END INTERFACE
            f = MERGE(LIBXSMM_FLAGS, flags, .NOT.PRESENT(flags))
            IF (0.NE.LIBXSMM_COL_MAJOR) THEN
              CALL dgemm(                                                 &
       &        MERGE('N', 'T',                                           &
       &            0.EQ.IAND(LIBXSMM_GEMM_FLAG_TRANS_A, f)),             &
       &        MERGE('N', 'T',                                           &
       &            0.EQ.IAND(LIBXSMM_GEMM_FLAG_TRANS_B, f)),             &
       &        m, n, k,                                                  &
       &        MERGE(REAL(LIBXSMM_ALPHA, T), alpha, .NOT.PRESENT(alpha)),&
       &        a, MAX(SIZE(a, 1), m), b, MAX(SIZE(b, 1), k),             &
  