[PATCH] D17142: SystemZ: Check required features when handling builtins

Jonas Paulsson via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 29 07:55:12 PDT 2016


jonpa retitled this revision from "SystemZ: Check that argument -fzvector is only given for -z13" to "SystemZ: Check required features when handling builtins".
jonpa updated the summary for this revision.
jonpa updated this revision to Diff 51910.
jonpa added a comment.

This patch has been reworked, and aims to specify which features systemz builtins require. The way of doing this has been taken from the X86 Target (with a '#define TARGET_BUILTIN')

If a builtin is used by the programmer for a target that does not include a required feature, the FE will abort early with an error message.
This includes vector and transactional memory builtins.

Three new tests: One for z13, which pass, and two for the generic target, which are supposed to fail (therefore I put them in separate files). The correct error messages are generated by clang, and recognized by Filecheck, but the tests are still reported as failing. I am not sure what to do to get around this, and would appreciate a hint on this. I tried expected-error{{}}, but that did not work.


http://reviews.llvm.org/D17142

Files:
  include/clang/Basic/BuiltinsSystemZ.def
  lib/Basic/Targets.cpp
  test/CodeGen/builtins-systemz-generic0.c
  test/CodeGen/builtins-systemz-generic1.c
  test/CodeGen/builtins-systemz-tbegin.c

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


More information about the cfe-commits mailing list