aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cases/emptyasm_le32.ll16
-rw-r--r--tests/test_core.py3
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/cases/emptyasm_le32.ll b/tests/cases/emptyasm_le32.ll
new file mode 100644
index 00000000..e123d3d5
--- /dev/null
+++ b/tests/cases/emptyasm_le32.ll
@@ -0,0 +1,16 @@
+; ModuleID = 'tests/hello_world.bc'
+
+@.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*]
+
+; [#uses=0]
+define i32 @main() {
+entry:
+ %retval = alloca i32, align 4 ; [#uses=1 type=i32*]
+ store i32 0, i32* %retval
+ call void asm sideeffect "", "~{memory}"() nounwind, !srcloc !0
+ %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0 type=i32]
+ ret i32 1
+}
+
+; [#uses=1]
+declare i32 @printf(i8*, ...)
diff --git a/tests/test_core.py b/tests/test_core.py
index 69fb31f3..dd5b1e39 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -9044,6 +9044,9 @@ def process(filename):
if '_noasm' in shortname and Settings.ASM_JS:
print self.skip('case "%s" not relevant for asm.js' % shortname)
continue
+ if '_le32' in shortname and not self.is_le32():
+ print self.skip('case "%s" not relevant for non-le32 target' % shortname)
+ continue
self.emcc_args = emcc_args
if os.path.exists(shortname + '.emcc'):
if not self.emcc_args: continue