aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-02-18 13:29:37 -0800
committerMichael Forney <mforney@mforney.org>2019-02-18 13:29:50 -0800
commit608c11d269d2ee74ea64906e627b36d1a50d01c0 (patch)
treee860486d39303686254562440949125c8b9a019b
parent9f964b728151066dd37dd80269ed23ea4b4cdeab (diff)
downloadcproc-608c11d269d2ee74ea64906e627b36d1a50d01c0.tar.xz
Simplify test added in 9f964b7281
-rw-r--r--tests/common-real-int-sign.c3
-rw-r--r--tests/common-real-int-sign.qbe14
2 files changed, 6 insertions, 11 deletions
diff --git a/tests/common-real-int-sign.c b/tests/common-real-int-sign.c
index d67c301..e31aaeb 100644
--- a/tests/common-real-int-sign.c
+++ b/tests/common-real-int-sign.c
@@ -1,4 +1,3 @@
int main(void) {
- unsigned x = -1;
- return 0 > x;
+ return 0 > -1u;
}
diff --git a/tests/common-real-int-sign.qbe b/tests/common-real-int-sign.qbe
index 589c72e..09f4060 100644
--- a/tests/common-real-int-sign.qbe
+++ b/tests/common-real-int-sign.qbe
@@ -1,14 +1,10 @@
export
function w $main() {
@start.1
- %.1 =l alloc4 4
@body.2
- %.2 =l add %.1, 0
- %.3 =w sub 0, 1
- %.4 =w copy %.3
- storew %.4, %.2
- %.5 =w copy 0
- %.6 =w loaduw %.1
- %.7 =w cugtw %.5, %.6
- ret %.7
+ %.1 =w copy 0
+ %.2 =w copy 0
+ %.3 =w sub %.2, 1
+ %.4 =w cugtw %.1, %.3
+ ret %.4
}