aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorAndrea Corallo2019-11-18 19:35:44 +0100
committerAndrea Corallo2020-01-01 11:38:07 +0100
commit16fe8a4678d20eac893bd05941071396b67bc84d (patch)
tree4a385cb5e16ff4de743f84f5cbd8fdfe86f22a6c /test/src
parenta99a3fbc40076aa3965feb759e816a8a25621c6a (diff)
downloademacs-16fe8a4678d20eac893bd05941071396b67bc84d.tar.gz
emacs-16fe8a4678d20eac893bd05941071396b67bc84d.zip
allow for pure function call removal optimization
Diffstat (limited to 'test/src')
-rw-r--r--test/src/comp-test-funcs.el5
-rw-r--r--test/src/comp-tests.el5
2 files changed, 10 insertions, 0 deletions
diff --git a/test/src/comp-test-funcs.el b/test/src/comp-test-funcs.el
index ca604b748f3..20d15ac0e7a 100644
--- a/test/src/comp-test-funcs.el
+++ b/test/src/comp-test-funcs.el
@@ -252,6 +252,11 @@
252(defun comp-tests-signal-f () 252(defun comp-tests-signal-f ()
253 (signal 'foo t)) 253 (signal 'foo t))
254 254
255(defun comp-tests-func-call-removal-f ()
256 (let ((a 10)
257 (b 3))
258 (% a b)))
259
255 260
256;;;;;;;;;;;;;;;;;;;; 261;;;;;;;;;;;;;;;;;;;;
257;; Tromey's tests ;; 262;; Tromey's tests ;;
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index 0a1d45724fa..b008dbd574e 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -317,6 +317,11 @@ Check that the resulting binaries do not differ."
317 (comp-tests-signal-f) 317 (comp-tests-signal-f)
318 (t err)) 318 (t err))
319 '(foo . t)))) 319 '(foo . t))))
320
321(ert-deftest comp-tests-func-call-removal ()
322 ;; See `comp-propagate-insn' `comp-function-call-remove'.
323 (should (= (comp-tests-func-call-removal-f) 1)))
324
320 325
321;;;;;;;;;;;;;;;;;;;; 326;;;;;;;;;;;;;;;;;;;;
322;; Tromey's tests ;; 327;; Tromey's tests ;;