summary refs log tree commit diff
path: root/doc/il.txt
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-07-02 20:32:09 -0700
committerQuentin Carbonneaux <quentin@c9x.me>2021-11-10 23:08:53 +0100
commit6838496e5c990339755577eb16b949fe2f47790e (patch)
tree91e13641873c6133b0540916ea1fd9f1fd5ee9ad /doc/il.txt
parentae8803cbe655f64a2ef1739c8dfc5c12af99bdfb (diff)
downloadroux-6838496e5c990339755577eb16b949fe2f47790e.tar.gz
fold: Don't fold invalid addition/subtraction rather than failing
This may happen in a branch QBE doesn't realize is unreachable,
for example (simplified from real code found in ncurses)

	data $str = { b "abcdef", b 0 }
	function l $f(w %x) {
	@start
		%.1 =w ceqw %x, 0
		jnz %.1, @logic_join, @logic_right
	@logic_right
		%p =l call $strchr(l $str, w %x)
		%.2 =w ceql %p, 0
	@logic_join
		%.3 =w phi @start %.1, @logic_right %.2
		jnz %.3, @fail, @return
	@fail
		ret 0
	@return
		%.4 =l sub %p, $str
		ret %.4
	}
Diffstat (limited to 'doc/il.txt')
0 files changed, 0 insertions, 0 deletions