summaryrefslogtreecommitdiffstats
path: root/llvm/utils/update_llc_test_checks.py
diff options
context:
space:
mode:
authorTim Shen <timshen91@gmail.com>2017-03-23 16:02:47 +0000
committerTim Shen <timshen91@gmail.com>2017-03-23 16:02:47 +0000
commitce26a45f7c3457c9b1953ba99b1054c123b6c055 (patch)
treea1e3b0b09fc86a44b007e57adbda540b9ca71889 /llvm/utils/update_llc_test_checks.py
parent86abf9aeb3138dcee9d2c110a911dbe8108fdd62 (diff)
downloadbcm5719-llvm-ce26a45f7c3457c9b1953ba99b1054c123b6c055.tar.gz
bcm5719-llvm-ce26a45f7c3457c9b1953ba99b1054c123b6c055.zip
[PPC] Add generated tests for all atomic operations
Summary: Add tests for all atomic operations for powerpc64le, so that all changes can be easily examined. Reviewers: kbarton, hfinkel, echristo Subscribers: mehdi_amini, nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D31285 llvm-svn: 298614
Diffstat (limited to 'llvm/utils/update_llc_test_checks.py')
-rwxr-xr-xllvm/utils/update_llc_test_checks.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/utils/update_llc_test_checks.py b/llvm/utils/update_llc_test_checks.py
index 4cc72a43718..3b3ff74d863 100755
--- a/llvm/utils/update_llc_test_checks.py
+++ b/llvm/utils/update_llc_test_checks.py
@@ -29,6 +29,8 @@ def llc(args, cmd_args, ir):
SCRUB_WHITESPACE_RE = re.compile(r'(?!^(| \w))[ \t]+', flags=re.M)
SCRUB_TRAILING_WHITESPACE_RE = re.compile(r'[ \t]+$', flags=re.M)
SCRUB_KILL_COMMENT_RE = re.compile(r'^ *#+ +kill:.*\n')
+SCRUB_LOOP_COMMENT_RE = re.compile(
+ r'# =>This Inner Loop Header:.*|# in Loop:.*', flags=re.M)
ASM_FUNCTION_X86_RE = re.compile(
r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@(?P=func)\n[^:]*?'
@@ -114,6 +116,8 @@ def scrub_asm_powerpc64le(asm):
asm = SCRUB_WHITESPACE_RE.sub(r' ', asm)
# Expand the tabs used for indentation.
asm = string.expandtabs(asm, 2)
+ # Stripe unimportant comments
+ asm = SCRUB_LOOP_COMMENT_RE.sub(r'', asm)
# Strip trailing whitespace.
asm = SCRUB_TRAILING_WHITESPACE_RE.sub(r'', asm)
return asm
OpenPOWER on IntegriCloud