ac: use the correct LLVM processor name on Raven2

Submitted by Marek Olšák on Jan. 28, 2019, 3:56 p.m.

Details

Message ID 20190128155638.4304-1-maraeo@gmail.com
State New
Headers show
Series "ac: use the correct LLVM processor name on Raven2" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Marek Olšák Jan. 28, 2019, 3:56 p.m.
From: Marek Olšák <marek.olsak@amd.com>

---
 src/amd/common/ac_llvm_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/common/ac_llvm_util.c
index 174a37f22f8..69446863b95 100644
--- a/src/amd/common/ac_llvm_util.c
+++ b/src/amd/common/ac_llvm_util.c
@@ -127,21 +127,21 @@  const char *ac_get_llvm_processor_name(enum radeon_family family)
 		return "polaris11";
 	case CHIP_VEGA10:
 		return "gfx900";
 	case CHIP_RAVEN:
 		return "gfx902";
 	case CHIP_VEGA12:
 		return "gfx904";
 	case CHIP_VEGA20:
 		return "gfx906";
 	case CHIP_RAVEN2:
-		return "gfx902"; /* TODO: use gfx909 when it's available */
+		return HAVE_LLVM >= 0x0800 ? "gfx909" : "gfx902";
 	default:
 		return "";
 	}
 }
 
 static LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family,
 						     enum ac_target_machine_options tm_options,
 						     LLVMCodeGenOptLevel level,
 						     const char **out_triple)
 {

Comments

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

On Mon, Jan 28, 2019 at 10:56 AM Marek Olšák <maraeo@gmail.com> wrote:
>
> From: Marek Olšák <marek.olsak@amd.com>
>
> ---
>  src/amd/common/ac_llvm_util.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/common/ac_llvm_util.c
> index 174a37f22f8..69446863b95 100644
> --- a/src/amd/common/ac_llvm_util.c
> +++ b/src/amd/common/ac_llvm_util.c
> @@ -127,21 +127,21 @@ const char *ac_get_llvm_processor_name(enum radeon_family family)
>                 return "polaris11";
>         case CHIP_VEGA10:
>                 return "gfx900";
>         case CHIP_RAVEN:
>                 return "gfx902";
>         case CHIP_VEGA12:
>                 return "gfx904";
>         case CHIP_VEGA20:
>                 return "gfx906";
>         case CHIP_RAVEN2:
> -               return "gfx902"; /* TODO: use gfx909 when it's available */
> +               return HAVE_LLVM >= 0x0800 ? "gfx909" : "gfx902";
>         default:
>                 return "";
>         }
>  }
>
>  static LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family,
>                                                      enum ac_target_machine_options tm_options,
>                                                      LLVMCodeGenOptLevel level,
>                                                      const char **out_triple)
>  {
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev