blaise/vendor/qbe/test/gvn1.ssa
Graeme Geldenhuys c9dde987f0 vendor: update QBE from v1.2 to v1.3
QBE 1.3 (released 2026-06-01) adds Windows AMD64 ABI support
(amd64_win target), improved PIC via extern symbol constants,
GVN/GCM optimisation passes, if-conversion, and various
correctness and performance fixes.

All 2293 compiler tests pass against the new QBE binary.
2026-06-02 16:54:51 +01:00

20 lines
310 B
Plaintext

export
function w $test(w %p1, w %p2) {
@start
@entry
%t1 =w copy 1
jnz %t1, @live, @dead1
@live
%t2 =w add %p1, %p2
ret %t2
@dead1
%t2 =w add %p1, %p2 # live ins in dead blk
@dead2
jnz %t1, @live, @dead1
}
# >>> driver
# extern int test(int p1, int p2);
# int main() { return test(1, 2) != 3; }
# <<<