[llvm-commits] [hlvm] r38308 - in /hlvm/trunk/test/invalid: argscall.hlx argtype.hlx blockresult.hlx funcresult.hlx select.hlx signature.hlx switch.hlx unless.hlx until.hlx while.hlx
Reid Spencer
reid at x10sys.com
Sat Jul 7 17:02:12 PDT 2007
Author: reid
Date: Sat Jul 7 19:02:12 2007
New Revision: 38308
URL: http://llvm.org/viewvc/llvm-project?rev=38308&view=rev
Log:
Fix bundle identifier to reflect the "invalid" test cases.
Add checks for the various loop operators.
Added:
hlvm/trunk/test/invalid/select.hlx
hlvm/trunk/test/invalid/switch.hlx
hlvm/trunk/test/invalid/unless.hlx
hlvm/trunk/test/invalid/until.hlx
hlvm/trunk/test/invalid/while.hlx
Modified:
hlvm/trunk/test/invalid/argscall.hlx
hlvm/trunk/test/invalid/argtype.hlx
hlvm/trunk/test/invalid/blockresult.hlx
hlvm/trunk/test/invalid/funcresult.hlx
hlvm/trunk/test/invalid/signature.hlx
Modified: hlvm/trunk/test/invalid/argscall.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/invalid/argscall.hlx?rev=38308&r1=38307&r2=38308&view=diff
==============================================================================
--- hlvm/trunk/test/invalid/argscall.hlx (original)
+++ hlvm/trunk/test/invalid/argscall.hlx Sat Jul 7 19:02:12 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="http://hlvm.org/src/hlvm/test/xml2xml/argscall.hlx">
+<hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="http://hlvm.org/src/hlvm/test/invalid/argscall.hlx">
<bundle id="argscall">
<signature id="no_args" result="void"/>
<signature id="one_arg" result="void">
Modified: hlvm/trunk/test/invalid/argtype.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/invalid/argtype.hlx?rev=38308&r1=38307&r2=38308&view=diff
==============================================================================
--- hlvm/trunk/test/invalid/argtype.hlx (original)
+++ hlvm/trunk/test/invalid/argtype.hlx Sat Jul 7 19:02:12 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="http://hlvm.org/src/hlvm/test/xml2xml/argscall.hlx">
+<hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="http://hlvm.org/src/hlvm/test/invalid/argscall.hlx">
<bundle id="argscall">
<signature id="two_arg" result="double">
<arg id="one" type="u32"/>
Modified: hlvm/trunk/test/invalid/blockresult.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/invalid/blockresult.hlx?rev=38308&r1=38307&r2=38308&view=diff
==============================================================================
--- hlvm/trunk/test/invalid/blockresult.hlx (original)
+++ hlvm/trunk/test/invalid/blockresult.hlx Sat Jul 7 19:02:12 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="http://hlvm.org/src/hlvm/test/xml2xml/loop.hlx">
+<hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="http://hlvm.org/src/hlvm/test/invalid/loop.hlx">
<bundle id="loop">
<constant id="0" type="s32">
<dec>0</dec>
Modified: hlvm/trunk/test/invalid/funcresult.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/invalid/funcresult.hlx?rev=38308&r1=38307&r2=38308&view=diff
==============================================================================
--- hlvm/trunk/test/invalid/funcresult.hlx (original)
+++ hlvm/trunk/test/invalid/funcresult.hlx Sat Jul 7 19:02:12 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="http://hlvm.org/src/hlvm/test/xml2xml/funcresult.hlx">
+<hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="http://hlvm.org/src/hlvm/test/invalid/funcresult.hlx">
<bundle id="funcresult">
<constant id="1" type="u32">
<dec>1</dec>
Added: hlvm/trunk/test/invalid/select.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/invalid/select.hlx?rev=38308&view=auto
==============================================================================
--- hlvm/trunk/test/invalid/select.hlx (added)
+++ hlvm/trunk/test/invalid/select.hlx Sat Jul 7 19:02:12 2007
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="http://hlvm.org/src/hlvm/test/invalid/select.hlx">
+ <bundle id="select">
+ <constant id="0" type="s32">
+ <dec>0</dec>
+ </constant>
+ <constant id="21" type="s32">
+ <dec>21</dec>
+ </constant>
+ <constant id="42" type="s32">
+ <dec>42</dec>
+ </constant>
+ <program id="select">
+ <block>
+ <!-- Non-boolean expression -->
+ <select>
+ <ref id="0"/>
+ <ref id="21"/>
+ <ref id="42"/>
+ </select>
+ <!-- Operand 2 as block with no result where required -->
+ <result>
+ <select>
+ <ne>
+ <ref id="0"/>
+ <ref id="21"/>
+ </ne>
+ <block><ref id="21"/></block>
+ <ref id="42"/>
+ </select>
+ </result>
+ <!-- Operand 3 as block with no result where required -->
+ <result>
+ <select>
+ <ne>
+ <ref id="0"/>
+ <ref id="21"/>
+ </ne>
+ <ref id="42"/>
+ <block><ref id="21"/></block>
+ </select>
+ </result>
+ <!-- Mismatched result types -->
+ <result>
+ <select>
+ <ne>
+ <ref id="0"/>
+ <ref id="21"/>
+ </ne>
+ <ref id="42"/>
+ <ne>
+ <ref id="0"/>
+ <ref id="21"/>
+ </ne>
+ </select>
+ </result>
+ <result>
+ <ref id="0"/>
+ </result>
+ <ret/>
+ </block>
+ </program>
+ </bundle>
+</hlvm>
Modified: hlvm/trunk/test/invalid/signature.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/invalid/signature.hlx?rev=38308&r1=38307&r2=38308&view=diff
==============================================================================
--- hlvm/trunk/test/invalid/signature.hlx (original)
+++ hlvm/trunk/test/invalid/signature.hlx Sat Jul 7 19:02:12 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="http://hlvm.org/src/hlvm/test/xml2xml/signature.hlx">
+<hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="http://hlvm.org/src/hlvm/test/invalid/signature.hlx">
<bundle id="signature">
<signature id="callee_type"/>
</bundle>
Added: hlvm/trunk/test/invalid/switch.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/invalid/switch.hlx?rev=38308&view=auto
==============================================================================
--- hlvm/trunk/test/invalid/switch.hlx (added)
+++ hlvm/trunk/test/invalid/switch.hlx Sat Jul 7 19:02:12 2007
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="http://hlvm.org/src/hlvm/test/invalid/return.hlx">
+ <bundle id="return">
+ <constant id="0" type="s32"><dec>0</dec></constant>
+ <constant id="1" type="s32"><dec>1</dec></constant>
+ <constant id="2" type="s32"><dec>2</dec></constant>
+ <constant id="3" type="s32"><dec>3</dec></constant>
+ <constant id="4" type="s32"><dec>4</dec></constant>
+ <constant id="5" type="s32"><dec>5</dec></constant>
+ <constant id="21" type="s32"><dec>21</dec></constant>
+ <constant id="42" type="s32"><dec>42</dec></constant>
+ <constant id="3.0" type="f64"><dbl>3.0</dbl></constant>
+ <program id="return">
+ <block>
+ <!-- Switch with non-integral control expression -->
+ <switch>
+ <ref id="3.0"/>
+ <ref id="5"/>
+ </switch>
+ <!-- Switch with non-result block that requires one -->
+ <result>
+ <switch>
+ <ref id="42"/>
+ <ref id="5"/>
+ <ref id="21"/>
+ <block><ref id="1"/></block>
+ </switch>
+ </result>
+ <!-- Switch with case results that don't agree in type -->
+ <switch>
+ <ref id="42"/>
+ <ref id="5"/>
+ <ref id="21"/>
+ <block><result><ref id="1"/></result></block>
+ <ref id="2"/>
+ <ne><ref id="42"/><ref id="21"/></ne>
+ </switch>
+ <result>
+ <ref id="42"/>
+ </result>
+ <ret/>
+ </block>
+ </program>
+ </bundle>
+</hlvm>
Added: hlvm/trunk/test/invalid/unless.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/invalid/unless.hlx?rev=38308&view=auto
==============================================================================
--- hlvm/trunk/test/invalid/unless.hlx (added)
+++ hlvm/trunk/test/invalid/unless.hlx Sat Jul 7 19:02:12 2007
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="http://hlvm.org/src/hlvm/test/invalid/unless.hlx">
+ <bundle id="unless">
+ <constant id="0" type="s32">
+ <dec>0</dec>
+ </constant>
+ <constant id="1" type="s32">
+ <dec>1</dec>
+ </constant>
+ <program id="unless">
+ <block>
+ <!-- Non-boolean control expression -->
+ <unless>
+ <ref id="0"/>
+ <ref id="1"/>
+ </unless>
+ <!-- Block without result where one expected -->
+ <!-- Void function result for non-void function -->
+ <result>
+ <unless>
+ <ne>
+ <ref id="1"/>
+ <ref id="0"/>
+ </ne>
+ <block><ref id="0"/></block>
+ </unless>
+ </result>
+ <result>
+ <ref id="0"/>
+ </result>
+ <ret/>
+ </block>
+ </program>
+ </bundle>
+</hlvm>
Added: hlvm/trunk/test/invalid/until.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/invalid/until.hlx?rev=38308&view=auto
==============================================================================
--- hlvm/trunk/test/invalid/until.hlx (added)
+++ hlvm/trunk/test/invalid/until.hlx Sat Jul 7 19:02:12 2007
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="http://hlvm.org/src/hlvm/test/invalid/until.hlx">
+ <bundle id="until">
+ <constant id="0" type="s32">
+ <dec>0</dec>
+ </constant>
+ <constant id="1" type="s32">
+ <dec>1</dec>
+ </constant>
+ <program id="until">
+ <block>
+ <!-- Non-boolean control expression -->
+ <until>
+ <ref id="0"/>
+ <ref id="1"/>
+ </until>
+ <!-- Block without result where one expected -->
+ <!-- Void function result for non-void function -->
+ <result>
+ <until>
+ <block><ref id="0"/></block>
+ <ne>
+ <ref id="1"/>
+ <ref id="0"/>
+ </ne>
+ </until>
+ </result>
+ <result>
+ <ref id="0"/>
+ </result>
+ <ret/>
+ </block>
+ </program>
+ </bundle>
+</hlvm>
Added: hlvm/trunk/test/invalid/while.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/invalid/while.hlx?rev=38308&view=auto
==============================================================================
--- hlvm/trunk/test/invalid/while.hlx (added)
+++ hlvm/trunk/test/invalid/while.hlx Sat Jul 7 19:02:12 2007
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hlvm xmlns="http://hlvm.org/src/hlvm/Reader/XML/HLVM.rng" pubid="http://hlvm.org/src/hlvm/test/invalid/while.hlx">
+ <bundle id="while">
+ <constant id="0" type="s32">
+ <dec>0</dec>
+ </constant>
+ <constant id="1" type="s32">
+ <dec>1</dec>
+ </constant>
+ <program id="while">
+ <block>
+ <!-- Non-boolean control expression -->
+ <while>
+ <ref id="0"/>
+ <ref id="1"/>
+ </while>
+ <!-- Block without result where one expected -->
+ <!-- Void function result for non-void function -->
+ <result>
+ <while>
+ <ne>
+ <ref id="1"/>
+ <ref id="0"/>
+ </ne>
+ <block><ref id="0"/></block>
+ </while>
+ </result>
+ <result>
+ <ref id="0"/>
+ </result>
+ <ret/>
+ </block>
+ </program>
+ </bundle>
+</hlvm>
More information about the llvm-commits
mailing list