[PATCH] D111078: [AIX] Enable int128 in 64 bit mode

Jinsong Ji via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 4 10:47:03 PDT 2021


jsji created this revision.
jsji added reviewers: PowerPC, hubert.reinterpretcast, nemanjai.
jsji requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

This patch remove the override in AIX target,
so the int128 is enabled in 64 bit mode or with ForceEnableInt128.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111078

Files:
  clang/lib/Basic/Targets/OSTargets.h
  clang/test/Driver/types.c
  llvm/test/CodeGen/PowerPC/int128_ldst.ll


Index: llvm/test/CodeGen/PowerPC/int128_ldst.ll
===================================================================
--- llvm/test/CodeGen/PowerPC/int128_ldst.ll
+++ llvm/test/CodeGen/PowerPC/int128_ldst.ll
@@ -17,6 +17,9 @@
 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
 ; RUN:   -mcpu=pwr8  \
 ; RUN:   < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff \
+; RUN:   -mcpu=pwr8  \
+; RUN:   < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
 
 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
 define dso_local i128 @ld_0___int128___int128(i64 %ptr) {
Index: clang/test/Driver/types.c
===================================================================
--- clang/test/Driver/types.c
+++ clang/test/Driver/types.c
@@ -12,8 +12,8 @@
 // RUN: not %clang -c --target=powerpc-ibm-aix -fsyntax-only %s \
 // RUN: 2>&1 | FileCheck %s
 
-// RUN: not %clang -c --target=powerpc64-ibm-aix -fsyntax-only %s \
-// RUN: 2>&1 | FileCheck %s
+// RUN: %clang -c --target=powerpc64-ibm-aix -fsyntax-only %s \
+// RUN: 2>&1
 
 void a() {
   __int128_t s;
Index: clang/lib/Basic/Targets/OSTargets.h
===================================================================
--- clang/lib/Basic/Targets/OSTargets.h
+++ clang/lib/Basic/Targets/OSTargets.h
@@ -743,7 +743,6 @@
 
   // AIX sets FLT_EVAL_METHOD to be 1.
   unsigned getFloatEvalMethod() const override { return 1; }
-  bool hasInt128Type() const override { return false; }
 
   bool defaultsToAIXPowerAlignment() const override { return true; }
 };


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111078.376946.patch
Type: text/x-patch
Size: 1624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211004/85975b6f/attachment.bin>


More information about the cfe-commits mailing list