[PATCH] D18533: Fixing PR26558: the adc builtins do not require the adx target attribute

Yunzhong Gao via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 28 17:07:44 PDT 2016


ygao created this revision.
ygao added subscribers: craig.topper, bogner, cfe-commits.

Hi,
The addcarry and subborrow variants of the builtins do not require the adx target attribute. Only the addcarryx variants require them.
This patch attempts to remove the target attribute requirements from these builtins, and also to update the test (run the same test without adx and make sure nothing breaks).
Could you review?

Many thanks,
- Gao

http://reviews.llvm.org/D18533

Files:
  include/clang/Basic/BuiltinsX86.def
  test/CodeGen/adc-builtins.c

Index: test/CodeGen/adc-builtins.c
===================================================================
--- test/CodeGen/adc-builtins.c
+++ test/CodeGen/adc-builtins.c
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-feature +adx -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s
 
 #define __MM_MALLOC_H
 
Index: include/clang/Basic/BuiltinsX86.def
===================================================================
--- include/clang/Basic/BuiltinsX86.def
+++ include/clang/Basic/BuiltinsX86.def
@@ -690,10 +690,10 @@
 // ADX
 TARGET_BUILTIN(__builtin_ia32_addcarryx_u32, "UcUcUiUiUi*", "", "adx")
 TARGET_BUILTIN(__builtin_ia32_addcarryx_u64, "UcUcULLiULLiULLi*", "", "adx")
-TARGET_BUILTIN(__builtin_ia32_addcarry_u32, "UcUcUiUiUi*", "", "adx")
-TARGET_BUILTIN(__builtin_ia32_addcarry_u64, "UcUcULLiULLiULLi*", "", "adx")
-TARGET_BUILTIN(__builtin_ia32_subborrow_u32, "UcUcUiUiUi*", "", "adx")
-TARGET_BUILTIN(__builtin_ia32_subborrow_u64, "UcUcULLiULLiULLi*", "", "adx")
+TARGET_BUILTIN(__builtin_ia32_addcarry_u32, "UcUcUiUiUi*", "", "")
+TARGET_BUILTIN(__builtin_ia32_addcarry_u64, "UcUcULLiULLiULLi*", "", "")
+TARGET_BUILTIN(__builtin_ia32_subborrow_u32, "UcUcUiUiUi*", "", "")
+TARGET_BUILTIN(__builtin_ia32_subborrow_u64, "UcUcULLiULLiULLi*", "", "")
 
 // RDSEED
 TARGET_BUILTIN(__builtin_ia32_rdseed16_step, "UiUs*", "", "rdseed")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18533.51857.patch
Type: text/x-patch
Size: 1438 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160329/d122b74c/attachment-0001.bin>


More information about the cfe-commits mailing list