diff options
author | Derek Schuff <dschuff@chromium.org> | 2016-02-05 17:16:55 -0800 |
---|---|---|
committer | Derek Schuff <dschuff@chromium.org> | 2016-02-05 17:16:55 -0800 |
commit | 271504de91e3f396251041f94c0f29094af92207 (patch) | |
tree | c276d94f6f93d288c2c485e87f610edf944c9bfd | |
parent | 66719ac9e42d5fc85e3defaa52ab25c0ca547a23 (diff) | |
parent | 31c0fb8bdf84a21d7c71953bec9107f504662f56 (diff) | |
download | binaryen-271504de91e3f396251041f94c0f29094af92207.tar.gz binaryen-271504de91e3f396251041f94c0f29094af92207.tar.bz2 binaryen-271504de91e3f396251041f94c0f29094af92207.zip |
Merge pull request #188 from WebAssembly/select_parse
Fix .s parser to accept new order of select operands
134 files changed, 1507 insertions, 1862 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h index f800e193b..31b28f1e2 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -688,9 +688,9 @@ class S2WasmBuilder { skipComma(); auto curr = allocator.alloc<Select>(); auto inputs = getInputs(3); - curr->ifTrue = inputs[1]; - curr->ifFalse = inputs[2]; - curr->condition = inputs[0]; + curr->ifTrue = inputs[0]; + curr->ifFalse = inputs[1]; + curr->condition = inputs[2]; assert(curr->condition->type == i32); curr->type = type; setOutput(curr, assign); diff --git a/test/llvm_autogenerated/legalize.s b/test/llvm_autogenerated/legalize.s index daa91b504..5ca96894d 100644 --- a/test/llvm_autogenerated/legalize.s +++ b/test/llvm_autogenerated/legalize.s @@ -1,5 +1,5 @@ .text - .file "/s/llvm/llvm/test/CodeGen/WebAssembly/legalize.ll" + .file "/s/llvm-upstream/llvm/test/CodeGen/WebAssembly/legalize.ll" .globl shl_i3 .type shl_i3,@function shl_i3: @@ -699,394 +699,394 @@ bigshift: i64.load $152=, 512($312) i32.const $push470=, 8 i32.add $push345=, $0, $pop470 - i64.const $push469=, 512 - i64.lt_u $push72=, $17, $pop469 - tee_local $push468=, $168=, $pop72 - i64.const $push467=, 256 - i64.lt_u $push64=, $17, $pop467 - tee_local $push466=, $167=, $pop64 - i64.const $push465=, 128 - i64.lt_u $push56=, $17, $pop465 - tee_local $push464=, $166=, $pop56 - i32.const $push463=, 8 + i32.const $push469=, 8 i32.const $311=, 512 i32.add $311=, $312, $311 - i32.add $push340=, $311, $pop463 + i32.add $push340=, $311, $pop469 i64.load $push341=, 0($pop340) i64.const $push37=, 0 - i64.select $push342=, $pop464, $pop341, $pop37 - i64.const $push462=, 0 - i64.select $push343=, $pop466, $pop342, $pop462 - i64.const $push461=, 0 - i64.select $push344=, $pop468, $pop343, $pop461 + i64.const $push468=, 128 + i64.lt_u $push56=, $17, $pop468 + tee_local $push467=, $168=, $pop56 + i64.select $push342=, $pop341, $pop37, $pop467 + i64.const $push466=, 0 + i64.const $push465=, 256 + i64.lt_u $push64=, $17, $pop465 + tee_local $push464=, $167=, $pop64 + i64.select $push343=, $pop342, $pop466, $pop464 + i64.const $push463=, 0 + i64.const $push462=, 512 + i64.lt_u $push72=, $17, $pop462 + tee_local $push461=, $166=, $pop72 + i64.select $push344=, $pop343, $pop463, $pop461 i64.store $discard=, 0($pop345), $pop344 i64.const $push460=, 0 - i64.select $push337=, $166, $152, $pop460 + i64.select $push337=, $152, $pop460, $168 i64.const $push459=, 0 - i64.select $push338=, $167, $pop337, $pop459 + i64.select $push338=, $pop337, $pop459, $167 i64.const $push458=, 0 - i64.select $push339=, $168, $pop338, $pop458 + i64.select $push339=, $pop338, $pop458, $166 i64.store $discard=, 0($0), $pop339 i32.const $push346=, 24 i32.add $push347=, $0, $pop346 + i64.or $push331=, $149, $150 + i64.select $push333=, $pop331, $151, $168 i64.const $push457=, 0 i64.eq $push59=, $17, $pop457 tee_local $push456=, $165=, $pop59 - i64.or $push331=, $149, $150 - i64.select $push333=, $166, $pop331, $151 - i64.select $push334=, $pop456, $4, $pop333 + i64.select $push334=, $4, $pop333, $pop456 i64.const $push455=, 0 - i64.select $push335=, $167, $pop334, $pop455 + i64.select $push335=, $pop334, $pop455, $167 i64.const $push454=, 0 - i64.select $push336=, $168, $pop335, $pop454 + i64.select $push336=, $pop335, $pop454, $166 i64.store $discard=, 0($pop347), $pop336 i32.const $push348=, 16 i32.add $push349=, $0, $pop348 i64.or $push324=, $146, $147 - i64.select $push325=, $166, $pop324, $148 - i64.select $push326=, $165, $3, $pop325 + i64.select $push325=, $pop324, $148, $168 + i64.select $push326=, $3, $pop325, $165 i64.const $push453=, 0 - i64.select $push327=, $167, $pop326, $pop453 + i64.select $push327=, $pop326, $pop453, $167 i64.const $push452=, 0 - i64.select $push328=, $168, $pop327, $pop452 + i64.select $push328=, $pop327, $pop452, $166 i64.store $discard=, 0($pop349), $pop328 i32.const $push350=, 56 i32.add $push351=, $0, $pop350 i64.or $push291=, $132, $133 - i64.select $push293=, $166, $pop291, $134 - i64.select $push294=, $165, $8, $pop293 - i64.const $push451=, 128 - i64.lt_u $push61=, $172, $pop451 - tee_local $push450=, $164=, $pop61 - i64.const $push449=, 0 - i64.select $push296=, $pop450, $135, $pop449 + i64.select $push293=, $pop291, $134, $168 + i64.select $push294=, $8, $pop293, $165 + i64.const $push451=, 0 + i64.const $push450=, 128 + i64.lt_u $push61=, $172, $pop450 + tee_local $push449=, $164=, $pop61 + i64.select $push296=, $135, $pop451, $pop449 i64.or $push297=, $pop294, $pop296 - i64.const $push448=, 0 - i64.eq $push54=, $176, $pop448 - tee_local $push447=, $153=, $pop54 - i64.const $push446=, 128 - i64.lt_u $push51=, $176, $pop446 - tee_local $push445=, $163=, $pop51 i64.or $push285=, $130, $129 - i64.select $push287=, $pop445, $pop285, $131 - i64.select $push288=, $pop447, $4, $pop287 - i64.select $push298=, $167, $pop297, $pop288 - i64.select $push299=, $165, $8, $pop298 + i64.const $push448=, 128 + i64.lt_u $push51=, $176, $pop448 + tee_local $push447=, $163=, $pop51 + i64.select $push287=, $pop285, $131, $pop447 + i64.const $push446=, 0 + i64.eq $push54=, $176, $pop446 + tee_local $push445=, $153=, $pop54 + i64.select $push288=, $4, $pop287, $pop445 + i64.select $push298=, $pop297, $pop288, $167 + i64.select $push299=, $8, $pop298, $165 i64.const $push444=, 0 - i64.select $push300=, $168, $pop299, $pop444 + i64.select $push300=, $pop299, $pop444, $166 i64.store $discard=, 0($pop351), $pop300 i32.const $push352=, 48 i32.add $push353=, $0, $pop352 i64.or $push275=, $125, $126 - i64.select $push276=, $166, $pop275, $127 - i64.select $push277=, $165, $7, $pop276 + i64.select $push276=, $pop275, $127, $168 + i64.select $push277=, $7, $pop276, $165 i64.const $push443=, 0 - i64.select $push278=, $164, $128, $pop443 + i64.select $push278=, $128, $pop443, $164 i64.or $push279=, $pop277, $pop278 i64.or $push272=, $123, $122 - i64.select $push273=, $163, $pop272, $124 - i64.select $push274=, $153, $3, $pop273 - i64.select $push280=, $167, $pop279, $pop274 - i64.select $push281=, $165, $7, $pop280 + i64.select $push273=, $pop272, $124, $163 + i64.select $push274=, $3, $pop273, $153 + i64.select $push280=, $pop279, $pop274, $167 + i64.select $push281=, $7, $pop280, $165 i64.const $push442=, 0 - i64.select $push282=, $168, $pop281, $pop442 + i64.select $push282=, $pop281, $pop442, $166 i64.store $discard=, 0($pop353), $pop282 i32.const $push354=, 40 i32.add $push355=, $0, $pop354 i64.const $push441=, 0 - i64.select $push317=, $166, $144, $pop441 + i64.select $push317=, $144, $pop441, $168 + i64.or $push312=, $141, $142 + i64.select $push314=, $pop312, $143, $164 i64.const $push440=, 0 i64.eq $push170=, $172, $pop440 tee_local $push439=, $162=, $pop170 - i64.or $push312=, $141, $142 - i64.select $push314=, $164, $pop312, $143 - i64.select $push315=, $pop439, $2, $pop314 + i64.select $push315=, $2, $pop314, $pop439 i64.or $push318=, $pop317, $pop315 i64.const $push438=, 0 - i64.select $push320=, $163, $145, $pop438 - i64.select $push321=, $167, $pop318, $pop320 - i64.select $push322=, $165, $6, $pop321 + i64.select $push320=, $145, $pop438, $163 + i64.select $push321=, $pop318, $pop320, $167 + i64.select $push322=, $6, $pop321, $165 i64.const $push437=, 0 - i64.select $push323=, $168, $pop322, $pop437 + i64.select $push323=, $pop322, $pop437, $166 i64.store $discard=, 0($pop355), $pop323 i32.const $push356=, 32 i32.add $push357=, $0, $pop356 i64.const $push436=, 0 - i64.select $push304=, $166, $139, $pop436 + i64.select $push304=, $139, $pop436, $168 i64.or $push301=, $136, $137 - i64.select $push302=, $164, $pop301, $138 - i64.select $push303=, $162, $1, $pop302 + i64.select $push302=, $pop301, $138, $164 + i64.select $push303=, $1, $pop302, $162 i64.or $push305=, $pop304, $pop303 i64.const $push435=, 0 - i64.select $push306=, $163, $140, $pop435 - i64.select $push307=, $167, $pop305, $pop306 - i64.select $push308=, $165, $5, $pop307 + i64.select $push306=, $140, $pop435, $163 + i64.select $push307=, $pop305, $pop306, $167 + i64.select $push308=, $5, $pop307, $165 i64.const $push434=, 0 - i64.select $push309=, $168, $pop308, $pop434 + i64.select $push309=, $pop308, $pop434, $166 i64.store $discard=, 0($pop357), $pop309 i32.const $push358=, 120 i32.add $push359=, $0, $pop358 i64.or $push101=, $51, $52 - i64.select $push103=, $166, $pop101, $53 - i64.select $push104=, $165, $16, $pop103 + i64.select $push103=, $pop101, $53, $168 + i64.select $push104=, $16, $pop103, $165 i64.const $push433=, 0 - i64.select $push106=, $164, $54, $pop433 + i64.select $push106=, $54, $pop433, $164 i64.or $push107=, $pop104, $pop106 i64.or $push95=, $49, $48 - i64.select $push97=, $163, $pop95, $50 - i64.select $push98=, $153, $12, $pop97 - i64.select $push108=, $167, $pop107, $pop98 - i64.select $push109=, $165, $16, $pop108 - i64.const $push432=, 256 - i64.lt_u $push69=, $171, $pop432 - tee_local $push431=, $161=, $pop69 - i64.const $push430=, 128 - i64.lt_u $push67=, $171, $pop430 - tee_local $push429=, $160=, $pop67 - i64.const $push428=, 0 - i64.select $push111=, $pop429, $55, $pop428 - i64.const $push427=, 0 - i64.select $push112=, $pop431, $pop111, $pop427 + i64.select $push97=, $pop95, $50, $163 + i64.select $push98=, $12, $pop97, $153 + i64.select $push108=, $pop107, $pop98, $167 + i64.select $push109=, $16, $pop108, $165 + i64.const $push432=, 0 + i64.const $push431=, 128 + i64.lt_u $push67=, $171, $pop431 + tee_local $push430=, $161=, $pop67 + i64.select $push111=, $55, $pop432, $pop430 + i64.const $push429=, 0 + i64.const $push428=, 256 + i64.lt_u $push69=, $171, $pop428 + tee_local $push427=, $160=, $pop69 + i64.select $push112=, $pop111, $pop429, $pop427 i64.or $push113=, $pop109, $pop112 - i64.const $push426=, 256 - i64.lt_u $push48=, $180, $pop426 - tee_local $push425=, $159=, $pop48 + i64.or $push84=, $45, $175 + i64.const $push426=, 128 + i64.lt_u $push40=, $180, $pop426 + tee_local $push425=, $159=, $pop40 + i64.select $push86=, $pop84, $46, $pop425 i64.const $push424=, 0 i64.eq $push43=, $180, $pop424 tee_local $push423=, $158=, $pop43 - i64.const $push422=, 128 - i64.lt_u $push40=, $180, $pop422 - tee_local $push421=, $157=, $pop40 - i64.or $push84=, $45, $175 - i64.select $push86=, $pop421, $pop84, $46 - i64.select $push87=, $pop423, $8, $pop86 - i64.const $push420=, 128 - i64.lt_u $push45=, $178, $pop420 - tee_local $push419=, $156=, $pop45 - i64.const $push418=, 0 - i64.select $push89=, $pop419, $47, $pop418 + i64.select $push87=, $8, $pop86, $pop423 + i64.const $push422=, 0 + i64.const $push421=, 128 + i64.lt_u $push45=, $178, $pop421 + tee_local $push420=, $157=, $pop45 + i64.select $push89=, $47, $pop422, $pop420 i64.or $push90=, $pop87, $pop89 + i64.or $push78=, $177, $174 + i64.const $push419=, 128 + i64.lt_u $push34=, $182, $pop419 + tee_local $push418=, $156=, $pop34 + i64.select $push80=, $pop78, $179, $pop418 i64.const $push417=, 0 i64.eq $push38=, $182, $pop417 tee_local $push416=, $155=, $pop38 - i64.const $push415=, 128 - i64.lt_u $push34=, $182, $pop415 - tee_local $push414=, $154=, $pop34 - i64.or $push78=, $177, $174 - i64.select $push80=, $pop414, $pop78, $179 - i64.select $push81=, $pop416, $4, $pop80 - i64.select $push91=, $pop425, $pop90, $pop81 - i64.select $push92=, $158, $8, $pop91 - i64.select $push114=, $168, $pop113, $pop92 - i64.select $push115=, $165, $16, $pop114 + i64.select $push81=, $4, $pop80, $pop416 + i64.const $push415=, 256 + i64.lt_u $push48=, $180, $pop415 + tee_local $push414=, $154=, $pop48 + i64.select $push91=, $pop90, $pop81, $pop414 + i64.select $push92=, $8, $pop91, $158 + i64.select $push114=, $pop113, $pop92, $166 + i64.select $push115=, $16, $pop114, $165 i64.store $discard=, 0($pop359), $pop115 i32.const $push360=, 112 i32.add $push361=, $0, $pop360 i64.or $push57=, $40, $41 - i64.select $push58=, $166, $pop57, $42 - i64.select $push60=, $165, $15, $pop58 + i64.select $push58=, $pop57, $42, $168 + i64.select $push60=, $15, $pop58, $165 i64.const $push413=, 0 - i64.select $push62=, $164, $43, $pop413 + i64.select $push62=, $43, $pop413, $164 i64.or $push63=, $pop60, $pop62 i64.or $push52=, $38, $37 - i64.select $push53=, $163, $pop52, $39 - i64.select $push55=, $153, $11, $pop53 - i64.select $push65=, $167, $pop63, $pop55 - i64.select $push66=, $165, $15, $pop65 + i64.select $push53=, $pop52, $39, $163 + i64.select $push55=, $11, $pop53, $153 + i64.select $push65=, $pop63, $pop55, $167 + i64.select $push66=, $15, $pop65, $165 i64.const $push412=, 0 - i64.select $push68=, $160, $44, $pop412 + i64.select $push68=, $44, $pop412, $161 i64.const $push411=, 0 - i64.select $push70=, $161, $pop68, $pop411 + i64.select $push70=, $pop68, $pop411, $160 i64.or $push71=, $pop66, $pop70 i64.or $push41=, $34, $33 - i64.select $push42=, $157, $pop41, $35 - i64.select $push44=, $158, $7, $pop42 + i64.select $push42=, $pop41, $35, $159 + i64.select $push44=, $7, $pop42, $158 i64.const $push410=, 0 - i64.select $push46=, $156, $36, $pop410 + i64.select $push46=, $36, $pop410, $157 i64.or $push47=, $pop44, $pop46 i64.or $push35=, $181, $173 - i64.select $push36=, $154, $pop35, $169 - i64.select $push39=, $155, $3, $pop36 - i64.select $push49=, $159, $pop47, $pop39 - i64.select $push50=, $158, $7, $pop49 - i64.select $push73=, $168, $pop71, $pop50 - i64.select $push74=, $165, $15, $pop73 + i64.select $push36=, $pop35, $169, $156 + i64.select $push39=, $3, $pop36, $155 + i64.select $push49=, $pop47, $pop39, $154 + i64.select $push50=, $7, $pop49, $158 + i64.select $push73=, $pop71, $pop50, $166 + i64.select $push74=, $15, $pop73, $165 i64.store $discard=, 0($pop361), $pop74 i32.const $push362=, 104 i32.add $push363=, $0, $pop362 i64.const $push409=, 0 - i64.select $push250=, $166, $115, $pop409 + i64.select $push250=, $115, $pop409, $168 i64.or $push245=, $112, $113 - i64.select $push247=, $164, $pop245, $114 - i64.select $push248=, $162, $10, $pop247 + i64.select $push247=, $pop245, $114, $164 + i64.select $push248=, $10, $pop247, $162 i64.or $push251=, $pop250, $pop248 i64.const $push408=, 0 - i64.select $push253=, $163, $116, $pop408 - i64.select $push254=, $167, $pop251, $pop253 - i64.select $push255=, $165, $14, $pop254 + i64.select $push253=, $116, $pop408, $163 + i64.select $push254=, $pop251, $pop253, $167 + i64.select $push255=, $14, $pop254, $165 + i64.or $push238=, $109, $110 + i64.select $push240=, $pop238, $111, $161 i64.const $push407=, 0 i64.eq $push129=, $171, $pop407 tee_local $push406=, $153=, $pop129 - i64.or $push238=, $109, $110 - i64.select $push240=, $160, $pop238, $111 - i64.select $push241=, $pop406, $6, $pop240 + i64.select $push241=, $6, $pop240, $pop406 i64.const $push405=, 0 - i64.select $push242=, $161, $pop241, $pop405 + i64.select $push242=, $pop241, $pop405, $160 i64.or $push256=, $pop255, $pop242 i64.const $push404=, 0 - i64.select $push264=, $157, $120, $pop404 + i64.select $push264=, $120, $pop404, $159 + i64.or $push259=, $117, $118 + i64.select $push261=, $pop259, $119, $157 i64.const $push403=, 0 i64.eq $push227=, $178, $pop403 tee_local $push402=, $155=, $pop227 - i64.or $push259=, $117, $118 - i64.select $push261=, $156, $pop259, $119 - i64.select $push262=, $pop402, $2, $pop261 + i64.select $push262=, $2, $pop261, $pop402 i64.or $push265=, $pop264, $pop262 i64.const $push401=, 0 - i64.select $push267=, $154, $121, $pop401 - i64.select $push268=, $159, $pop265, $pop267 - i64.select $push269=, $158, $6, $pop268 - i64.select $push270=, $168, $pop256, $pop269 - i64.select $push271=, $165, $14, $pop270 + i64.select $push267=, $121, $pop401, $156 + i64.select $push268=, $pop265, $pop267, $154 + i64.select $push269=, $6, $pop268, $158 + i64.select $push270=, $pop256, $pop269, $166 + i64.select $push271=, $14, $pop270, $165 i64.store $discard=, 0($pop363), $pop271 i32.const $push364=, 96 i32.add $push365=, $0, $pop364 i64.const $push400=, 0 - i64.select $push219=, $166, $102, $pop400 + i64.select $push219=, $102, $pop400, $168 i64.or $push216=, $99, $100 - i64.select $push217=, $164, $pop216, $101 - i64.select $push218=, $162, $9, $pop217 + i64.select $push217=, $pop216, $101, $164 + i64.select $push218=, $9, $pop217, $162 i64.or $push220=, $pop219, $pop218 i64.const $push399=, 0 - i64.select $push221=, $163, $103, $pop399 - i64.select $push222=, $167, $pop220, $pop221 - i64.select $push223=, $165, $13, $pop222 + i64.select $push221=, $103, $pop399, $163 + i64.select $push222=, $pop220, $pop221, $167 + i64.select $push223=, $13, $pop222, $165 i64.or $push212=, $96, $97 - i64.select $push213=, $160, $pop212, $98 - i64.select $push214=, $153, $5, $pop213 + i64.select $push213=, $pop212, $98, $161 + i64.select $push214=, $5, $pop213, $153 i64.const $push398=, 0 - i64.select $push215=, $161, $pop214, $pop398 + i64.select $push215=, $pop214, $pop398, $160 i64.or $push224=, $pop223, $pop215 i64.const $push397=, 0 - i64.select $push229=, $157, $107, $pop397 + i64.select $push229=, $107, $pop397, $159 i64.or $push225=, $104, $105 - i64.select $push226=, $156, $pop225, $106 - i64.select $push228=, $155, $1, $pop226 + i64.select $push226=, $pop225, $106, $157 + i64.select $push228=, $1, $pop226, $155 i64.or $push230=, $pop229, $pop228 i64.const $push396=, 0 - i64.select $push231=, $154, $108, $pop396 - i64.select $push232=, $159, $pop230, $pop231 - i64.select $push233=, $158, $5, $pop232 - i64.select $push234=, $168, $pop224, $pop233 - i64.select $push235=, $165, $13, $pop234 + i64.select $push231=, $108, $pop396, $156 + i64.select $push232=, $pop230, $pop231, $154 + i64.select $push233=, $5, $pop232, $158 + i64.select $push234=, $pop224, $pop233, $166 + i64.select $push235=, $13, $pop234, $165 i64.store $discard=, 0($pop365), $pop235 i32.const $push366=, 72 i32.add $push367=, $0, $pop366 i64.const $push395=, 0 - i64.select $push204=, $166, $94, $pop395 + i64.select $push204=, $94, $pop395, $168 i64.const $push394=, 0 - i64.select $push205=, $167, $pop204, $pop394 + i64.select $push205=, $pop204, $pop394, $167 i64.or $push194=, $90, $91 - i64.select $push196=, $160, $pop194, $92 - i64.select $push197=, $153, $2, $pop196 - i64.const $push393=, 128 - i64.lt_u $push120=, $170, $pop393 - tee_local $push392=, $163=, $pop120 - i64.const $push391=, 0 - i64.select $push199=, $pop392, $93, $pop391 + i64.select $push196=, $pop194, $92, $161 + i64.select $push197=, $2, $pop196, $153 + i64.const $push393=, 0 + i64.const $push392=, 128 + i64.lt_u $push120=, $170, $pop392 + tee_local $push391=, $163=, $pop120 + i64.select $push199=, $93, $pop393, $pop391 i64.or $push200=, $pop197, $pop199 i64.or $push188=, $87, $88 - i64.select $push190=, $164, $pop188, $89 - i64.select $push191=, $162, $6, $pop190 - i64.select $push201=, $161, $pop200, $pop191 - i64.select $push202=, $153, $2, $pop201 + i64.select $push190=, $pop188, $89, $164 + i64.select $push191=, $6, $pop190, $162 + i64.select $push201=, $pop200, $pop191, $160 + i64.select $push202=, $2, $pop201, $153 i64.or $push206=, $pop205, $pop202 i64.const $push390=, 0 - i64.select $push208=, $157, $95, $pop390 + i64.select $push208=, $95, $pop390, $159 i64.const $push389=, 0 - i64.select $push209=, $159, $pop208, $pop389 - i64.select $push210=, $168, $pop206, $pop209 - i64.select $push211=, $165, $10, $pop210 + i64.select $push209=, $pop208, $pop389, $154 + i64.select $push210=, $pop206, $pop209, $166 + i64.select $push211=, $10, $pop210, $165 i64.store $discard=, 0($pop367), $pop211 i32.const $push368=, 64 i32.add $push369=, $0, $pop368 i64.const $push388=, 0 - i64.select $push179=, $166, $85, $pop388 + i64.select $push179=, $85, $pop388, $168 i64.const $push387=, 0 - i64.select $push180=, $167, $pop179, $pop387 + i64.select $push180=, $pop179, $pop387, $167 i64.or $push172=, $81, $82 - i64.select $push173=, $160, $pop172, $83 - i64.select $push174=, $153, $1, $pop173 + i64.select $push173=, $pop172, $83, $161 + i64.select $push174=, $1, $pop173, $153 i64.const $push386=, 0 - i64.select $push175=, $163, $84, $pop386 + i64.select $push175=, $84, $pop386, $163 i64.or $push176=, $pop174, $pop175 i64.or $push168=, $78, $79 - i64.select $push169=, $164, $pop168, $80 - i64.select $push171=, $162, $5, $pop169 - i64.select $push177=, $161, $pop176, $pop171 - i64.select $push178=, $153, $1, $pop177 + i64.select $push169=, $pop168, $80, $164 + i64.select $push171=, $5, $pop169, $162 + i64.select $push177=, $pop176, $pop171, $160 + i64.select $push178=, $1, $pop177, $153 i64.or $push181=, $pop180, $pop178 i64.const $push385=, 0 - i64.select $push182=, $157, $86, $pop385 + i64.select $push182=, $86, $pop385, $159 i64.const $push384=, 0 - i64.select $push183=, $159, $pop182, $pop384 - i64.select $push184=, $168, $pop181, $pop183 - i64.select $push185=, $165, $9, $pop184 + i64.select $push183=, $pop182, $pop384, $154 + i64.select $push184=, $pop181, $pop183, $166 + i64.select $push185=, $9, $pop184, $165 i64.store $discard=, 0($pop369), $pop185 i32.const $push370=, 88 i32.add $push371=, $0, $pop370 i64.or $push140=, $67, $68 - i64.select $push142=, $166, $pop140, $69 - i64.select $push143=, $165, $12, $pop142 + i64.select $push142=, $pop140, $69, $168 + i64.select $push143=, $12, $pop142, $165 i64.const $push383=, 0 - i64.select $push144=, $167, $pop143, $pop383 + i64.select $push144=, $pop143, $pop383, $167 i64.const $push382=, 0 - i64.select $push152=, $160, $73, $pop382 + i64.select $push152=, $73, $pop382, $161 + i64.or $push147=, $70, $71 + i64.select $push149=, $pop147, $72, $163 i64.const $push381=, 0 i64.eq $push123=, $170, $pop381 tee_local $push380=, $162=, $pop123 - i64.or $push147=, $70, $71 - i64.select $push149=, $163, $pop147, $72 - i64.select $push150=, $pop380, $8, $pop149 + i64.select $push150=, $8, $pop149, $pop380 i64.or $push153=, $pop152, $pop150 i64.const $push379=, 0 - i64.select $push155=, $164, $74, $pop379 - i64.select $push156=, $161, $pop153, $pop155 - i64.select $push157=, $153, $4, $pop156 + i64.select $push155=, $74, $pop379, $164 + i64.select $push156=, $pop153, $pop155, $160 + i64.select $push157=, $4, $pop156, $153 i64.or $push158=, $pop144, $pop157 i64.or $push161=, $76, $75 - i64.select $push163=, $157, $pop161, $77 - i64.select $push164=, $158, $4, $pop163 + i64.select $push163=, $pop161, $77, $159 + i64.select $push164=, $4, $pop163, $158 i64.const $push378=, 0 - i64.select $push165=, $159, $pop164, $pop378 - i64.select $push166=, $168, $pop158, $pop165 - i64.select $push167=, $165, $12, $pop166 + i64.select $push165=, $pop164, $pop378, $154 + i64.select $push166=, $pop158, $pop165, $166 + i64.select $push167=, $12, $pop166, $165 i64.store $discard=, 0($pop371), $pop167 i32.const $push372=, 80 i32.add $push373=, $0, $pop372 i64.or $push116=, $56, $57 - i64.select $push117=, $166, $pop116, $58 - i64.select $push118=, $165, $11, $pop117 + i64.select $push117=, $pop116, $58, $168 + i64.select $push118=, $11, $pop117, $165 i64.const $push377=, 0 - i64.select $push119=, $167, $pop118, $pop377 + i64.select $push119=, $pop118, $pop377, $167 i64.const $push376=, 0 - i64.select $push125=, $160, $62, $pop376 + i64.select $push125=, $62, $pop376, $161 i64.or $push121=, $59, $60 - i64.select $push122=, $163, $pop121, $61 - i64.select $push124=, $162, $7, $pop122 + i64.select $push122=, $pop121, $61, $163 + i64.select $push124=, $7, $pop122, $162 i64.or $push126=, $pop125, $pop124 i64.const $push375=, 0 - i64.select $push127=, $164, $63, $pop375 - i64.select $push128=, $161, $pop126, $pop127 - i64.select $push130=, $153, $3, $pop128 + i64.select $push127=, $63, $pop375, $164 + i64.select $push128=, $pop126, $pop127, $160 + i64.select $push130=, $3, $pop128, $153 i64.or $push131=, $pop119, $pop130 i64.or $push132=, $65, $64 - i64.select $push133=, $157, $pop132, $66 - i64.select $push134=, $158, $3, $pop133 + i64.select $push133=, $pop132, $66, $159 + i64.select $push134=, $3, $pop133, $158 i64.const $push374=, 0 - i64.select $push135=, $159, $pop134, $pop374 - i64.select $push136=, $168, $pop131, $pop135 - i64.select $push137=, $165, $11, $pop136 + i64.select $push135=, $pop134, $pop374, $154 + i64.select $push136=, $pop131, $pop135, $166 + i64.select $push137=, $11, $pop136, $165 i64.store $discard=, 0($pop373), $pop137 i32.const $185=, 1024 i32.add $312=, $312, $185 diff --git a/test/llvm_autogenerated/legalize.wast b/test/llvm_autogenerated/legalize.wast index 3770fa482..4a886748f 100644 --- a/test/llvm_autogenerated/legalize.wast +++ b/test/llvm_autogenerated/legalize.wast @@ -2814,7 +2814,7 @@ ) ) (i64.const 0) - (set_local $$166 + (set_local $$168 (i64.lt_u (get_local $$17) (i64.const 128) @@ -2830,7 +2830,7 @@ ) ) (i64.const 0) - (set_local $$168 + (set_local $$166 (i64.lt_u (get_local $$17) (i64.const 512) @@ -2845,13 +2845,13 @@ (i64.select (get_local $$152) (i64.const 0) - (get_local $$166) + (get_local $$168) ) (i64.const 0) (get_local $$167) ) (i64.const 0) - (get_local $$168) + (get_local $$166) ) ) (i64.store align=8 @@ -2869,7 +2869,7 @@ (get_local $$150) ) (get_local $$151) - (get_local $$166) + (get_local $$168) ) (set_local $$165 (i64.eq @@ -2882,7 +2882,7 @@ (get_local $$167) ) (i64.const 0) - (get_local $$168) + (get_local $$166) ) ) (i64.store align=8 @@ -2900,7 +2900,7 @@ (get_local $$147) ) (get_local $$148) - (get_local $$166) + (get_local $$168) ) (get_local $$165) ) @@ -2908,7 +2908,7 @@ (get_local $$167) ) (i64.const 0) - (get_local $$168) + (get_local $$166) ) ) (i64.store align=8 @@ -2929,7 +2929,7 @@ (get_local $$133) ) (get_local $$134) - (get_local $$166) + (get_local $$168) ) (get_local $$165) ) @@ -2971,7 +2971,7 @@ (get_local $$165) ) (i64.const 0) - (get_local $$168) + (get_local $$166) ) ) (i64.store align=8 @@ -2992,7 +2992,7 @@ (get_local $$126) ) (get_local $$127) - (get_local $$166) + (get_local $$168) ) (get_local $$165) ) @@ -3019,7 +3019,7 @@ (get_local $$165) ) (i64.const 0) - (get_local $$168) + (get_local $$166) ) ) (i64.store align=8 @@ -3035,7 +3035,7 @@ (i64.select (get_local $$144) (i64.const 0) - (get_local $$166) + (get_local $$168) ) (i64.select (get_local $$2) @@ -3065,7 +3065,7 @@ (get_local $$165) ) (i64.const 0) - (get_local $$168) + (get_local $$166) ) ) (i64.store align=8 @@ -3081,7 +3081,7 @@ (i64.select (get_local $$139) (i64.const 0) - (get_local $$166) + (get_local $$168) ) (i64.select (get_local $$1) @@ -3106,7 +3106,7 @@ (get_local $$165) ) (i64.const 0) - (get_local $$168) + (get_local $$166) ) ) (i64.store align=8 @@ -3130,7 +3130,7 @@ (get_local $$52) ) (get_local $$53) - (get_local $$166) + (get_local $$168) ) (get_local $$165) ) @@ -3160,7 +3160,7 @@ (i64.select (get_local $$55) (i64.const 0) - (set_local $$160 + (set_local $$161 (i64.lt_u (get_local $$171) (i64.const 128) @@ -3168,7 +3168,7 @@ ) ) (i64.const 0) - (set_local $$161 + (set_local $$160 (i64.lt_u (get_local $$171) (i64.const 256) @@ -3188,7 +3188,7 @@ (get_local $$175) ) (get_local $$46) - (set_local $$157 + (set_local $$159 (i64.lt_u (get_local $$180) (i64.const 128) @@ -3205,7 +3205,7 @@ (i64.select (get_local $$47) (i64.const 0) - (set_local $$156 + (set_local $$157 (i64.lt_u (get_local $$178) (i64.const 128) @@ -3221,7 +3221,7 @@ (get_local $$174) ) (get_local $$179) - (set_local $$154 + (set_local $$156 (i64.lt_u (get_local $$182) (i64.const 128) @@ -3235,7 +3235,7 @@ ) ) ) - (set_local $$159 + (set_local $$154 (i64.lt_u (get_local $$180) (i64.const 256) @@ -3244,7 +3244,7 @@ ) (get_local $$158) ) - (get_local $$168) + (get_local $$166) ) (get_local $$165) ) @@ -3270,7 +3270,7 @@ (get_local $$41) ) (get_local $$42) - (get_local $$166) + (get_local $$168) ) (get_local $$165) ) @@ -3300,10 +3300,10 @@ (i64.select (get_local $$44) (i64.const 0) - (get_local $$160) + (get_local $$161) ) (i64.const 0) - (get_local $$161) + (get_local $$160) ) ) (i64.select @@ -3318,14 +3318,14 @@ (get_local $$33) ) (get_local $$35) - (get_local $$157) + (get_local $$159) ) (get_local $$158) ) (i64.select (get_local $$36) (i64.const 0) - (get_local $$156) + (get_local $$157) ) ) (i64.select @@ -3336,15 +3336,15 @@ (get_local $$173) ) (get_local $$169) - (get_local $$154) + (get_local $$156) ) (get_local $$155) ) - (get_local $$159) + (get_local $$154) ) (get_local $$158) ) - (get_local $$168) + (get_local $$166) ) (get_local $$165) ) @@ -3365,7 +3365,7 @@ (i64.select (get_local $$115) (i64.const 0) - (get_local $$166) + (get_local $$168) ) (i64.select (get_local $$10) @@ -3398,7 +3398,7 @@ (get_local $$110) ) (get_local $$111) - (get_local $$160) + (get_local $$161) ) (set_local $$153 (i64.eq @@ -3408,7 +3408,7 @@ ) ) (i64.const 0) - (get_local $$161) + (get_local $$160) ) ) (i64.select @@ -3418,7 +3418,7 @@ (i64.select (get_local $$120) (i64.const 0) - (get_local $$157) + (get_local $$159) ) (i64.select (get_local $$2) @@ -3428,7 +3428,7 @@ (get_local $$118) ) (get_local $$119) - (get_local $$156) + (get_local $$157) ) (set_local $$155 (i64.eq @@ -3441,13 +3441,13 @@ (i64.select (get_local $$121) (i64.const 0) - (get_local $$154) + (get_local $$156) ) - (get_local $$159) + (get_local $$154) ) (get_local $$158) ) - (get_local $$168) + (get_local $$166) ) (get_local $$165) ) @@ -3468,7 +3468,7 @@ (i64.select (get_local $$102) (i64.const 0) - (get_local $$166) + (get_local $$168) ) (i64.select (get_local $$9) @@ -3501,12 +3501,12 @@ (get_local $$97) ) (get_local $$98) - (get_local $$160) + (get_local $$161) ) (get_local $$153) ) (i64.const 0) - (get_local $$161) + (get_local $$160) ) ) (i64.select @@ -3516,7 +3516,7 @@ (i64.select (get_local $$107) (i64.const 0) - (get_local $$157) + (get_local $$159) ) (i64.select (get_local $$1) @@ -3526,7 +3526,7 @@ (get_local $$105) ) (get_local $$106) - (get_local $$156) + (get_local $$157) ) (get_local $$155) ) @@ -3534,13 +3534,13 @@ (i64.select (get_local $$108) (i64.const 0) - (get_local $$154) + (get_local $$156) ) - (get_local $$159) + (get_local $$154) ) (get_local $$158) ) - (get_local $$168) + (get_local $$166) ) (get_local $$165) ) @@ -3558,7 +3558,7 @@ (i64.select (get_local $$94) (i64.const 0) - (get_local $$166) + (get_local $$168) ) (i64.const 0) (get_local $$167) @@ -3575,7 +3575,7 @@ (get_local $$91) ) (get_local $$92) - (get_local $$160) + (get_local $$161) ) (get_local $$153) ) @@ -3602,7 +3602,7 @@ ) (get_local $$162) ) - (get_local $$161) + (get_local $$160) ) (get_local $$153) ) @@ -3611,12 +3611,12 @@ (i64.select (get_local $$95) (i64.const 0) - (get_local $$157) + (get_local $$159) ) (i64.const 0) - (get_local $$159) + (get_local $$154) ) - (get_local $$168) + (get_local $$166) ) (get_local $$165) ) @@ -3634,7 +3634,7 @@ (i64.select (get_local $$85) (i64.const 0) - (get_local $$166) + (get_local $$168) ) (i64.const 0) (get_local $$167) @@ -3651,7 +3651,7 @@ (get_local $$82) ) (get_local $$83) - (get_local $$160) + (get_local $$161) ) (get_local $$153) ) @@ -3673,7 +3673,7 @@ ) (get_local $$162) ) - (get_local $$161) + (get_local $$160) ) (get_local $$153) ) @@ -3682,12 +3682,12 @@ (i64.select (get_local $$86) (i64.const 0) - (get_local $$157) + (get_local $$159) ) (i64.const 0) - (get_local $$159) + (get_local $$154) ) - (get_local $$168) + (get_local $$166) ) (get_local $$165) ) @@ -3710,7 +3710,7 @@ (get_local $$68) ) (get_local $$69) - (get_local $$166) + (get_local $$168) ) (get_local $$165) ) @@ -3724,7 +3724,7 @@ (i64.select (get_local $$73) (i64.const 0) - (get_local $$160) + (get_local $$161) ) (i64.select (get_local $$8) @@ -3749,7 +3749,7 @@ (i64.const 0) (get_local $$164) ) - (get_local $$161) + (get_local $$160) ) (get_local $$153) ) @@ -3763,14 +3763,14 @@ (get_local $$75) ) (get_local $$77) - (get_local $$157) + (get_local $$159) ) (get_local $$158) ) (i64.const 0) - (get_local $$159) + (get_local $$154) ) - (get_local $$168) + (get_local $$166) ) (get_local $$165) ) @@ -3793,7 +3793,7 @@ (get_local $$57) ) (get_local $$58) - (get_local $$166) + (get_local $$168) ) (get_local $$165) ) @@ -3807,7 +3807,7 @@ (i64.select (get_local $$62) (i64.const 0) - (get_local $$160) + (get_local $$161) ) (i64.select (get_local $$7) @@ -3827,7 +3827,7 @@ (i64.const 0) (get_local $$164) ) - (get_local $$161) + (get_local $$160) ) (get_local $$153) ) @@ -3841,14 +3841,14 @@ (get_local $$64) ) (get_local $$66) - (get_local $$157) + (get_local $$159) ) (get_local $$158) ) (i64.const 0) - (get_local $$159) + (get_local $$154) ) - (get_local $$168) + (get_local $$166) ) (get_local $$165) ) diff --git a/test/llvm_autogenerated/select.s b/test/llvm_autogenerated/select.s index c353bd99d..676dae6df 100644 --- a/test/llvm_autogenerated/select.s +++ b/test/llvm_autogenerated/select.s @@ -1,11 +1,11 @@ .text - .file "/s/llvm/llvm/test/CodeGen/WebAssembly/select.ll" + .file "/s/llvm-upstream/llvm/test/CodeGen/WebAssembly/select.ll" .globl select_i32_bool .type select_i32_bool,@function select_i32_bool: .param i32, i32, i32 .result i32 - i32.select $push0=, $0, $1, $2 + i32.select $push0=, $1, $2, $0 return $pop0 .endfunc .Lfunc_end0: @@ -16,7 +16,7 @@ select_i32_bool: select_i32_eq: .param i32, i32, i32 .result i32 - i32.select $push0=, $0, $2, $1 + i32.select $push0=, $2, $1, $0 return $pop0 .endfunc .Lfunc_end1: @@ -27,7 +27,7 @@ select_i32_eq: select_i32_ne: .param i32, i32, i32 .result i32 - i32.select $push0=, $0, $1, $2 + i32.select $push0=, $1, $2, $0 return $pop0 .endfunc .Lfunc_end2: @@ -38,7 +38,7 @@ select_i32_ne: select_i64_bool: .param i32, i64, i64 .result i64 - i64.select $push0=, $0, $1, $2 + i64.select $push0=, $1, $2, $0 return $pop0 .endfunc .Lfunc_end3: @@ -49,7 +49,7 @@ select_i64_bool: select_i64_eq: .param i32, i64, i64 .result i64 - i64.select $push0=, $0, $2, $1 + i64.select $push0=, $2, $1, $0 return $pop0 .endfunc .Lfunc_end4: @@ -60,7 +60,7 @@ select_i64_eq: select_i64_ne: .param i32, i64, i64 .result i64 - i64.select $push0=, $0, $1, $2 + i64.select $push0=, $1, $2, $0 return $pop0 .endfunc .Lfunc_end5: @@ -71,7 +71,7 @@ select_i64_ne: select_f32_bool: .param i32, f32, f32 .result f32 - f32.select $push0=, $0, $1, $2 + f32.select $push0=, $1, $2, $0 return $pop0 .endfunc .Lfunc_end6: @@ -82,7 +82,7 @@ select_f32_bool: select_f32_eq: .param i32, f32, f32 .result f32 - f32.select $push0=, $0, $2, $1 + f32.select $push0=, $2, $1, $0 return $pop0 .endfunc .Lfunc_end7: @@ -93,7 +93,7 @@ select_f32_eq: select_f32_ne: .param i32, f32, f32 .result f32 - f32.select $push0=, $0, $1, $2 + f32.select $push0=, $1, $2, $0 return $pop0 .endfunc .Lfunc_end8: @@ -104,7 +104,7 @@ select_f32_ne: select_f64_bool: .param i32, f64, f64 .result f64 - f64.select $push0=, $0, $1, $2 + f64.select $push0=, $1, $2, $0 return $pop0 .endfunc .Lfunc_end9: @@ -115,7 +115,7 @@ select_f64_bool: select_f64_eq: .param i32, f64, f64 .result f64 - f64.select $push0=, $0, $2, $1 + f64.select $push0=, $2, $1, $0 return $pop0 .endfunc .Lfunc_end10: @@ -126,7 +126,7 @@ select_f64_eq: select_f64_ne: .param i32, f64, f64 .result f64 - f64.select $push0=, $0, $1, $2 + f64.select $push0=, $1, $2, $0 return $pop0 .endfunc .Lfunc_end11: diff --git a/test/revision b/test/revision index 9fe34ed6c..8d29e0a87 100644 --- a/test/revision +++ b/test/revision @@ -1 +1 @@ -2804 +2832 diff --git a/test/s2wasm_known_binaryen_shell_test_failures.txt b/test/s2wasm_known_binaryen_shell_test_failures.txt index f4d60f4d8..4a2117252 100644 --- a/test/s2wasm_known_binaryen_shell_test_failures.txt +++ b/test/s2wasm_known_binaryen_shell_test_failures.txt @@ -1,14 +1,3 @@ -# select's operand ordering was (cond, true, false) and is now -# (true, false, cond) as of: -# https://github.com/WebAssembly/spec/pull/221 -# LLVM hasn't been updated to emit the operations in the right order yet, which -# leads to the wrong order of execution. -20021010-2.c.s.wast -20060930-1.c.s.wast -20071216-1.c.s.wast -961125-1.c.s.wast -pr59221.c.s.wast - # [trap highest > memory] 930126-1.c.s.wast 990222-1.c.s.wast diff --git a/test/torture-s/20000224-1.c.s b/test/torture-s/20000224-1.c.s index 2aae91cb3..6d54b2556 100644 --- a/test/torture-s/20000224-1.c.s +++ b/test/torture-s/20000224-1.c.s @@ -28,10 +28,10 @@ test: # @test i32.shl $push3=, $1, $pop18 i32.const $push17=, 31 i32.shr_s $push4=, $pop3, $pop17 - i32.const $push16=, 1 - i32.lt_s $push2=, $0, $pop16 - i32.const $push15=, 0 - i32.select $push5=, $pop2, $pop15, $0 + i32.const $push16=, 0 + i32.const $push15=, 1 + i32.lt_s $push2=, $0, $pop15 + i32.select $push5=, $pop16, $0, $pop2 i32.and $push6=, $pop4, $pop5 i32.add $2=, $2, $pop6 i32.const $push14=, 1 diff --git a/test/torture-s/20000313-1.c.s b/test/torture-s/20000313-1.c.s index ac7b17b23..a07a08214 100644 --- a/test/torture-s/20000313-1.c.s +++ b/test/torture-s/20000313-1.c.s @@ -14,7 +14,7 @@ buggy: # @buggy i32.store $discard=, 0($0), $pop0 i32.const $push1=, -1 i32.const $push3=, 0 - i32.select $push2=, $1, $pop1, $pop3 + i32.select $push2=, $pop1, $pop3, $1 return $pop2 .endfunc .Lfunc_end0: diff --git a/test/torture-s/20000412-4.c.s b/test/torture-s/20000412-4.c.s index 03c5de970..5e194f33c 100644 --- a/test/torture-s/20000412-4.c.s +++ b/test/torture-s/20000412-4.c.s @@ -8,39 +8,38 @@ f: # @f .param i32, i32, i32, i32, i32 .local i32 # BB#0: # %entry + i32.sub $5=, $0, $2 block - i32.sub $push0=, $0, $2 - tee_local $push15=, $5=, $pop0 - i32.const $push1=, 0 - i32.gt_s $push2=, $pop15, $pop1 - i32.const $push14=, 0 - i32.select $push12=, $pop2, $5, $pop14 - tee_local $push13=, $5=, $pop12 - i32.const $push3=, 3 - i32.ge_s $push4=, $pop13, $pop3 - br_if $pop4, 0 # 0: down to label0 + i32.const $push0=, 0 + i32.const $push13=, 0 + i32.gt_s $push1=, $5, $pop13 + i32.select $push11=, $5, $pop0, $pop1 + tee_local $push12=, $5=, $pop11 + i32.const $push2=, 3 + i32.ge_s $push3=, $pop12, $pop2 + br_if $pop3, 0 # 0: down to label0 # BB#1: # %for.body.lr.ph - i32.add $push5=, $2, $5 - i32.const $push16=, -1 - i32.add $push6=, $pop5, $pop16 - i32.sub $push7=, $pop6, $0 - i32.mul $push8=, $3, $pop7 - i32.add $push9=, $2, $pop8 - i32.sub $2=, $pop9, $1 + i32.add $push4=, $2, $5 + i32.const $push14=, -1 + i32.add $push5=, $pop4, $pop14 + i32.sub $push6=, $pop5, $0 + i32.mul $push7=, $3, $pop6 + i32.add $push8=, $2, $pop7 + i32.sub $2=, $pop8, $1 .LBB0_2: # %for.body # =>This Inner Loop Header: Depth=1 loop # label1: i32.add $2=, $2, $3 - i32.const $push19=, -1 - i32.le_s $push10=, $2, $pop19 - br_if $pop10, 1 # 1: down to label2 + i32.const $push17=, -1 + i32.le_s $push9=, $2, $pop17 + br_if $pop9, 1 # 1: down to label2 # BB#3: # %for.cond # in Loop: Header=BB0_2 Depth=1 - i32.const $push18=, 1 - i32.add $5=, $5, $pop18 - i32.const $push17=, 2 - i32.le_s $push11=, $5, $pop17 - br_if $pop11, 0 # 0: up to label1 + i32.const $push16=, 1 + i32.add $5=, $5, $pop16 + i32.const $push15=, 2 + i32.le_s $push10=, $5, $pop15 + br_if $pop10, 0 # 0: up to label1 br 2 # 2: down to label0 .LBB0_4: # %if.then end_loop # label2: diff --git a/test/torture-s/20000503-1.c.s b/test/torture-s/20000503-1.c.s index 69546bf9e..09c2345e6 100644 --- a/test/torture-s/20000503-1.c.s +++ b/test/torture-s/20000503-1.c.s @@ -9,15 +9,14 @@ sub: # @sub .result i32 # BB#0: # %entry i32.const $push0=, -2 - i32.add $push1=, $0, $pop0 - tee_local $push8=, $0=, $pop1 - i32.const $push2=, 0 - i32.lt_s $push3=, $pop8, $pop2 - i32.const $push7=, 0 - i32.select $push4=, $pop3, $pop7, $0 - i32.const $push5=, 2 - i32.shl $push6=, $pop4, $pop5 - return $pop6 + i32.add $0=, $0, $pop0 + i32.const $push1=, 0 + i32.const $push6=, 0 + i32.lt_s $push2=, $0, $pop6 + i32.select $push3=, $pop1, $0, $pop2 + i32.const $push4=, 2 + i32.shl $push5=, $pop3, $pop4 + return $pop5 .endfunc .Lfunc_end0: .size sub, .Lfunc_end0-sub diff --git a/test/torture-s/20001111-1.c.s b/test/torture-s/20001111-1.c.s index 1136b77a3..eedb2c426 100644 --- a/test/torture-s/20001111-1.c.s +++ b/test/torture-s/20001111-1.c.s @@ -8,11 +8,11 @@ foo: # @foo .param i32 .result i32 # BB#0: # %entry - i32.const $push0=, 0 - i32.load8_u $push1=, next_buffer($pop0):p2align=2 i32.const $push2=, 52783 + i32.const $push0=, 0 i32.const $push5=, 0 - i32.select $push3=, $pop1, $pop2, $pop5 + i32.load8_u $push1=, next_buffer($pop5):p2align=2 + i32.select $push3=, $pop2, $pop0, $pop1 i32.add $push4=, $pop3, $0 return $pop4 .endfunc diff --git a/test/torture-s/20010129-1.c.s b/test/torture-s/20010129-1.c.s index 9a223002a..17a164111 100644 --- a/test/torture-s/20010129-1.c.s +++ b/test/torture-s/20010129-1.c.s @@ -120,7 +120,7 @@ foo: # @foo # BB#3: # %if.end17 # in Loop: Header=BB3_2 Depth=1 i32.const $push42=, 1 - i32.select $8=, $2, $2, $pop42 + i32.select $8=, $2, $pop42, $2 block block br_if $3, 0 # 0: down to label6 diff --git a/test/torture-s/20010221-1.c.s b/test/torture-s/20010221-1.c.s index 334bd08ac..2103d0b51 100644 --- a/test/torture-s/20010221-1.c.s +++ b/test/torture-s/20010221-1.c.s @@ -20,7 +20,7 @@ main: # @main .LBB0_1: # %for.body # =>This Inner Loop Header: Depth=1 loop # label1: - i32.select $0=, $1, $1, $0 + i32.select $0=, $1, $0, $1 i32.const $push9=, 1 i32.add $1=, $1, $pop9 i32.lt_s $push2=, $1, $2 diff --git a/test/torture-s/20010422-1.c.s b/test/torture-s/20010422-1.c.s index 60686383f..08f106346 100644 --- a/test/torture-s/20010422-1.c.s +++ b/test/torture-s/20010422-1.c.s @@ -8,11 +8,11 @@ foo: # @foo .param i32 .result i32 # BB#0: # %entry - i32.const $push0=, 5 - i32.lt_u $push1=, $0, $pop0 i32.const $push3=, 4 i32.const $push2=, 8 - i32.select $push4=, $pop1, $pop3, $pop2 + i32.const $push0=, 5 + i32.lt_u $push1=, $0, $pop0 + i32.select $push4=, $pop3, $pop2, $pop1 return $pop4 .endfunc .Lfunc_end0: diff --git a/test/torture-s/20020213-1.c.s b/test/torture-s/20020213-1.c.s index 16cf165c9..c9cd2cee6 100644 --- a/test/torture-s/20020213-1.c.s +++ b/test/torture-s/20020213-1.c.s @@ -8,21 +8,20 @@ foo: # @foo .local i32, i32 # BB#0: # %entry i32.const $push0=, 0 - i32.const $push10=, 0 - i32.load $push1=, b($pop10) + i32.load $push1=, b($pop0) i32.const $push2=, -1 - i32.add $push3=, $pop1, $pop2 - tee_local $push9=, $1=, $pop3 - i32.const $push4=, 2241 - i32.gt_s $push5=, $pop9, $pop4 - tee_local $push8=, $0=, $pop5 + i32.add $0=, $pop1, $pop2 + i32.const $push8=, 0 + i32.const $push3=, 2241 i32.const $push7=, 2241 - i32.select $push6=, $pop8, $pop7, $1 - i32.store $discard=, a+4($pop0), $pop6 + i32.gt_s $push4=, $0, $pop7 + tee_local $push6=, $1=, $pop4 + i32.select $push5=, $pop3, $0, $pop6 + i32.store $discard=, a+4($pop8), $pop5 block - i32.const $push11=, 0 - i32.eq $push12=, $0, $pop11 - br_if $pop12, 0 # 0: down to label0 + i32.const $push9=, 0 + i32.eq $push10=, $1, $pop9 + br_if $pop10, 0 # 0: down to label0 # BB#1: # %if.end return .LBB0_2: # %if.then diff --git a/test/torture-s/20020402-3.c.s b/test/torture-s/20020402-3.c.s index da44826e3..c4803cceb 100644 --- a/test/torture-s/20020402-3.c.s +++ b/test/torture-s/20020402-3.c.s @@ -10,75 +10,74 @@ blockvector_for_pc_sect: # @blockvector_for_pc_sect .local i32, i32, i32, i32, i32, i32 # BB#0: # %entry i32.load $push0=, 0($1) - tee_local $push26=, $5=, $pop0 - i32.load $1=, 0($pop26) + tee_local $push25=, $5=, $pop0 + i32.load $1=, 0($pop25) i32.const $4=, 0 copy_local $3=, $1 block block - i32.const $push25=, 1 - i32.le_s $push1=, $1, $pop25 + i32.const $push24=, 1 + i32.le_s $push1=, $1, $pop24 br_if $pop1, 0 # 0: down to label1 .LBB0_1: # %while.body # =>This Inner Loop Header: Depth=1 loop # label2: - i32.const $push33=, 1 - i32.add $push2=, $1, $pop33 - i32.const $push32=, 1 - i32.shr_s $push3=, $pop2, $pop32 - tee_local $push31=, $7=, $pop3 - i32.add $push4=, $pop31, $4 - tee_local $push30=, $1=, $pop4 - i32.const $push5=, 2 - i32.shl $push6=, $pop30, $pop5 - i32.add $push7=, $5, $pop6 - i32.const $push8=, 4 - i32.add $push9=, $pop7, $pop8 - i32.load $push10=, 0($pop9) - i64.load $push11=, 0($pop10) - i64.gt_u $push12=, $pop11, $0 - tee_local $push29=, $6=, $pop12 - i32.select $4=, $pop29, $4, $1 - i32.select $2=, $6, $1, $3 - i32.sub $push13=, $3, $1 - i32.select $1=, $6, $7, $pop13 + i32.const $push31=, 1 + i32.add $push2=, $1, $pop31 + i32.const $push30=, 1 + i32.shr_s $push3=, $pop2, $pop30 + tee_local $push29=, $7=, $pop3 + i32.add $1=, $pop29, $4 + i32.const $push4=, 2 + i32.shl $push5=, $1, $pop4 + i32.add $push6=, $5, $pop5 + i32.const $push7=, 4 + i32.add $push8=, $pop6, $pop7 + i32.load $push9=, 0($pop8) + i64.load $push10=, 0($pop9) + i64.gt_u $push11=, $pop10, $0 + tee_local $push28=, $6=, $pop11 + i32.select $4=, $4, $1, $pop28 + i32.select $2=, $1, $3, $6 + i32.sub $push12=, $3, $1 + i32.select $1=, $7, $pop12, $6 copy_local $3=, $2 - i32.const $push28=, 1 - i32.gt_s $push14=, $1, $pop28 - br_if $pop14, 0 # 0: up to label2 + i32.const $push27=, 1 + i32.gt_s $push13=, $1, $pop27 + br_if $pop13, 0 # 0: up to label2 # BB#2: # %while.cond8.preheader end_loop # label3: i32.const $3=, 0 - i32.const $push15=, -1 - i32.le_s $push16=, $4, $pop15 - br_if $pop16, 1 # 1: down to label0 + i32.const $push14=, -1 + i32.le_s $push15=, $4, $pop14 + br_if $pop15, 1 # 1: down to label0 .LBB0_3: # %while.body10.preheader end_block # label1: - i32.const $push17=, 2 - i32.shl $push18=, $4, $pop17 - i32.add $push19=, $pop18, $5 - i32.const $push20=, 4 - i32.add $1=, $pop19, $pop20 - i32.const $push27=, 1 - i32.add $4=, $4, $pop27 + i32.const $push16=, 2 + i32.shl $push17=, $4, $pop16 + i32.add $push18=, $pop17, $5 + i32.const $push19=, 4 + i32.add $1=, $pop18, $pop19 + i32.const $push26=, 1 + i32.add $4=, $4, $pop26 .LBB0_4: # %while.body10 # =>This Inner Loop Header: Depth=1 loop # label4: copy_local $3=, $5 - i32.load $push21=, 0($1) - i64.load $push22=, 8($pop21) - i64.gt_u $push23=, $pop22, $0 - br_if $pop23, 1 # 1: down to label5 + i32.load $push20=, 0($1) + i64.load $push21=, 8($pop20) + i64.gt_u $push22=, $pop21, $0 + br_if $pop22, 1 # 1: down to label5 # BB#5: # %while.cond8 # in Loop: Header=BB0_4 Depth=1 - i32.const $push36=, -1 - i32.add $4=, $4, $pop36 - i32.const $push35=, -4 - i32.add $1=, $1, $pop35 + i32.const $push34=, -1 + i32.add $4=, $4, $pop34 + i32.const $push33=, -4 + i32.add $1=, $1, $pop33 i32.const $3=, 0 - i32.const $push34=, 1 - i32.ge_s $push24=, $4, $pop34 - br_if $pop24, 0 # 0: up to label4 + i32.const $push32=, 1 + i32.ge_s $push23=, $4, $pop32 + br_if $pop23, 0 # 0: up to label4 .LBB0_6: # %cleanup end_loop # label5: end_block # label0: diff --git a/test/torture-s/20020413-1.c.s b/test/torture-s/20020413-1.c.s index 5ccfa294e..145604aca 100644 --- a/test/torture-s/20020413-1.c.s +++ b/test/torture-s/20020413-1.c.s @@ -23,16 +23,16 @@ test: # @test call __subtf3@FUNCTION, $8, $pop90, $pop3, $0, $1 block block + i64.load $push7=, 0($8) i32.const $push89=, 0 i32.lt_s $push2=, $3, $pop89 tee_local $push88=, $3=, $pop2 - i64.load $push7=, 0($8) - i64.select $push0=, $pop88, $pop7, $0 + i64.select $push0=, $pop7, $0, $pop88 tee_local $push87=, $0=, $pop0 i32.const $push4=, 8 i32.add $push5=, $8, $pop4 i64.load $push6=, 0($pop5) - i64.select $push1=, $3, $pop6, $1 + i64.select $push1=, $pop6, $1, $3 tee_local $push86=, $1=, $pop1 i64.const $push85=, 0 i64.const $push84=, 4611404543450677248 diff --git a/test/torture-s/20020615-1.c.s b/test/torture-s/20020615-1.c.s index d4c9a3a67..6d0892d34 100644 --- a/test/torture-s/20020615-1.c.s +++ b/test/torture-s/20020615-1.c.s @@ -9,36 +9,36 @@ line_hints: # @line_hints .result i32 .local i32, i32, i32, i32, i32 # BB#0: # %entry - i32.const $4=, 0 - i32.load $push2=, 0($0) - tee_local $push50=, $7=, $pop2 - i32.load $push0=, 4($0) - tee_local $push49=, $6=, $pop0 - i32.const $push48=, 0 + i32.const $5=, 0 + i32.const $push50=, 0 i32.load $push5=, 0($2) i32.load $push6=, 0($1) i32.sub $push7=, $pop5, $pop6 - tee_local $push47=, $3=, $pop7 - i32.sub $push11=, $pop48, $pop47 - i32.select $push12=, $pop49, $pop11, $3 - tee_local $push46=, $3=, $pop12 - i32.load $push1=, 8($0) - tee_local $push45=, $5=, $pop1 - i32.const $push44=, 0 + tee_local $push49=, $4=, $pop7 + i32.sub $push11=, $pop50, $pop49 + i32.load $push0=, 4($0) + tee_local $push48=, $7=, $pop0 + i32.select $push12=, $pop11, $4, $pop48 + tee_local $push47=, $3=, $pop12 + i32.const $push46=, 0 i32.load $push8=, 4($2) i32.load $push9=, 4($1) i32.sub $push10=, $pop8, $pop9 - tee_local $push43=, $0=, $pop10 - i32.sub $push13=, $pop44, $pop43 - i32.select $push14=, $pop45, $pop13, $0 - tee_local $push42=, $1=, $pop14 - i32.select $0=, $pop50, $pop46, $pop42 + tee_local $push45=, $1=, $pop10 + i32.sub $push13=, $pop46, $pop45 + i32.load $push1=, 8($0) + tee_local $push44=, $6=, $pop1 + i32.select $push14=, $pop13, $1, $pop44 + tee_local $push43=, $1=, $pop14 + i32.load $push2=, 0($0) + tee_local $push42=, $2=, $pop2 + i32.select $0=, $pop47, $pop43, $pop42 i32.const $push15=, 31 i32.shr_s $push16=, $0, $pop15 - tee_local $push41=, $2=, $pop16 + tee_local $push41=, $4=, $pop16 i32.add $push17=, $0, $pop41 - i32.xor $2=, $pop17, $2 - i32.select $1=, $7, $1, $3 + i32.xor $4=, $pop17, $4 + i32.select $1=, $1, $3, $2 i32.const $push40=, 31 i32.shr_s $push18=, $1, $pop40 tee_local $push39=, $3=, $pop18 @@ -51,20 +51,20 @@ line_hints: # @line_hints br_if $pop57, 0 # 0: down to label1 # BB#1: # %entry i32.const $push51=, 4 - i32.shr_s $push4=, $2, $pop51 + i32.shr_s $push4=, $4, $pop51 i32.gt_s $push20=, $3, $pop4 br_if $pop20, 0 # 0: down to label1 # BB#2: # %if.then21 - i32.select $push21=, $7, $5, $6 - i32.const $push22=, 0 - i32.gt_s $push23=, $0, $pop22 i32.const $push25=, 2 i32.const $push24=, 1 - i32.select $push26=, $pop23, $pop25, $pop24 + i32.const $push22=, 0 + i32.gt_s $push23=, $0, $pop22 + i32.select $push26=, $pop25, $pop24, $pop23 tee_local $push52=, $0=, $pop26 i32.const $push27=, 3 i32.xor $push28=, $pop52, $pop27 - i32.select $4=, $pop21, $pop28, $0 + i32.select $push21=, $6, $7, $2 + i32.select $5=, $pop28, $0, $pop21 br 1 # 1: down to label0 .LBB0_3: # %if.else end_block # label1: @@ -74,10 +74,9 @@ line_hints: # @line_hints # BB#4: # %if.else i32.const $push53=, 4 i32.shr_s $push29=, $3, $pop53 - i32.gt_s $push30=, $2, $pop29 + i32.gt_s $push30=, $4, $pop29 br_if $pop30, 0 # 0: down to label0 # BB#5: # %if.then31 - i32.select $push3=, $7, $6, $5 i32.const $push31=, 29 i32.shr_u $push32=, $1, $pop31 i32.const $push33=, 4 @@ -87,11 +86,12 @@ line_hints: # @line_hints tee_local $push54=, $0=, $pop35 i32.const $push36=, 12 i32.xor $push37=, $pop54, $pop36 - i32.select $push38=, $pop3, $pop37, $0 + i32.select $push3=, $7, $6, $2 + i32.select $push38=, $pop37, $0, $pop3 return $pop38 .LBB0_6: # %if.end40 end_block # label0: - return $4 + return $5 .endfunc .Lfunc_end0: .size line_hints, .Lfunc_end0-line_hints @@ -102,230 +102,36 @@ line_hints: # @line_hints .type main,@function main: # @main .result i32 - .local i32, i32, i32, i32, i32, i64, i64, i64, i32, i32, i32, i32, i32, i32 # BB#0: # %entry block - i32.const $push13=, 0 - i32.load $push3=, main.fh($pop13):p2align=4 - tee_local $push122=, $9=, $pop3 - i32.const $push121=, 0 - i32.load $push0=, main.fh+4($pop121) - tee_local $push120=, $8=, $pop0 - i32.const $push119=, 0 - i32.const $push118=, 0 - i64.load $push14=, main.gsf+8($pop118) - tee_local $push117=, $7=, $pop14 - i32.wrap/i64 $push15=, $pop117 - i32.const $push116=, 0 - i64.load $push16=, main.gsf($pop116):p2align=4 - tee_local $push115=, $6=, $pop16 - i32.wrap/i64 $push17=, $pop115 - i32.sub $push18=, $pop15, $pop17 - tee_local $push114=, $2=, $pop18 - i32.sub $push25=, $pop119, $pop114 - i32.select $push26=, $pop120, $pop25, $2 - tee_local $push113=, $1=, $pop26 - i32.const $push112=, 0 - i64.load $push1=, main.fh+8($pop112) - tee_local $push111=, $5=, $pop1 - i32.wrap/i64 $push2=, $pop111 - tee_local $push110=, $4=, $pop2 - i32.const $push109=, 0 - i64.const $push19=, 32 - i64.shr_u $push20=, $7, $pop19 - i32.wrap/i64 $push21=, $pop20 - i64.const $push108=, 32 - i64.shr_u $push22=, $6, $pop108 - i32.wrap/i64 $push23=, $pop22 - i32.sub $push24=, $pop21, $pop23 - tee_local $push107=, $2=, $pop24 - i32.sub $push27=, $pop109, $pop107 - i32.select $push28=, $pop110, $pop27, $2 - tee_local $push106=, $3=, $pop28 - i32.select $push4=, $pop122, $pop113, $pop106 - tee_local $push105=, $2=, $pop4 - i32.const $push169=, 0 - i32.eq $push170=, $pop105, $pop169 - br_if $pop170, 0 # 0: down to label2 -# BB#1: # %entry - i32.select $1=, $9, $3, $1 - i32.const $push29=, 31 - i32.shr_s $push33=, $1, $pop29 - tee_local $push125=, $3=, $pop33 - i32.add $push34=, $1, $pop125 - i32.xor $push11=, $pop34, $3 - i32.const $push124=, 31 - i32.shr_s $push30=, $2, $pop124 - tee_local $push123=, $1=, $pop30 - i32.add $push31=, $2, $pop123 - i32.xor $push32=, $pop31, $1 - i32.const $push35=, 4 - i32.shr_s $push12=, $pop32, $pop35 - i32.gt_s $push36=, $pop11, $pop12 - br_if $pop36, 0 # 0: down to label2 -# BB#2: # %line_hints.exit - i32.select $push37=, $9, $4, $8 - i32.const $push128=, 0 - i32.gt_s $push38=, $2, $pop128 - i32.const $push40=, 2 - i32.const $push39=, 1 - i32.select $push41=, $pop38, $pop40, $pop39 - tee_local $push127=, $2=, $pop41 - i32.const $push42=, 3 - i32.xor $push43=, $pop127, $pop42 - i32.select $push44=, $pop37, $pop43, $2 - i32.const $push126=, 1 - i32.ne $push45=, $pop44, $pop126 - br_if $pop45, 0 # 0: down to label2 -# BB#3: # %lor.lhs.false - i64.const $push60=, 4294967296 - i64.lt_u $push61=, $5, $pop60 - tee_local $push149=, $1=, $pop61 - i32.const $push148=, 0 - i32.load $push57=, main.fh+20($pop148) - tee_local $push147=, $13=, $pop57 - i32.const $push146=, 0 - i32.const $push145=, 0 - i64.load $push47=, main.gsf+24($pop145) - tee_local $push144=, $7=, $pop47 - i64.const $push51=, 32 - i64.shr_u $push52=, $pop144, $pop51 - i32.wrap/i64 $push53=, $pop52 - i32.const $push143=, 0 - i64.load $push49=, main.gsf+16($pop143):p2align=4 - tee_local $push142=, $6=, $pop49 - i64.const $push141=, 32 - i64.shr_u $push54=, $pop142, $pop141 - i32.wrap/i64 $push55=, $pop54 - i32.sub $push6=, $pop53, $pop55 - tee_local $push140=, $3=, $pop6 - i32.sub $push8=, $pop146, $pop140 - tee_local $push139=, $12=, $pop8 - i32.select $push59=, $pop147, $pop139, $3 - tee_local $push138=, $9=, $pop59 - i32.const $push137=, 0 - i32.load $push56=, main.fh+16($pop137):p2align=4 - tee_local $push136=, $11=, $pop56 - i32.const $push135=, 0 - i32.wrap/i64 $push48=, $7 - i32.wrap/i64 $push50=, $6 - i32.sub $push5=, $pop48, $pop50 - tee_local $push134=, $8=, $pop5 - i32.sub $push7=, $pop135, $pop134 - tee_local $push133=, $10=, $pop7 - i32.select $push58=, $pop136, $pop133, $8 - tee_local $push132=, $0=, $pop58 - i32.select $2=, $pop149, $pop138, $pop132 - i32.const $push62=, 31 - i32.shr_s $push63=, $2, $pop62 - tee_local $push131=, $4=, $pop63 - i32.add $push64=, $2, $pop131 - i32.xor $4=, $pop64, $4 - i32.select $9=, $1, $0, $9 - i32.const $push130=, 31 - i32.shr_s $push65=, $9, $pop130 - tee_local $push129=, $0=, $pop65 - i32.add $push66=, $9, $pop129 - i32.xor $0=, $pop66, $0 - block - i32.const $push171=, 0 - i32.eq $push172=, $2, $pop171 - br_if $pop172, 0 # 0: down to label3 -# BB#4: # %lor.lhs.false - i32.const $push150=, 4 - i32.shr_s $push46=, $4, $pop150 - i32.le_s $push67=, $0, $pop46 - br_if $pop67, 1 # 1: down to label2 -.LBB1_5: # %if.else.i82 - end_block # label3: - i32.const $push173=, 0 - i32.eq $push174=, $9, $pop173 - br_if $pop174, 0 # 0: down to label2 -# BB#6: # %if.else.i82 - i32.const $push151=, 4 - i32.shr_s $push68=, $0, $pop151 - i32.gt_s $push69=, $4, $pop68 - br_if $pop69, 0 # 0: down to label2 -# BB#7: # %line_hints.exit89 - i32.select $push9=, $1, $13, $11 - i32.const $push70=, 29 - i32.shr_u $push71=, $9, $pop70 - i32.const $push154=, 4 - i32.and $push72=, $pop71, $pop154 - i32.const $push153=, 4 - i32.add $push73=, $pop72, $pop153 - tee_local $push152=, $2=, $pop73 - i32.const $push74=, 12 - i32.xor $push75=, $pop152, $pop74 - i32.select $push76=, $pop9, $pop75, $2 - i32.const $push77=, 8 - i32.ne $push78=, $pop76, $pop77 - br_if $pop78, 0 # 0: down to label2 -# BB#8: # %lor.lhs.false3 - i32.const $push80=, 0 - i32.load $push85=, main.fh+24($pop80):p2align=3 - tee_local $push164=, $1=, $pop85 - i32.const $push163=, 0 - i32.load $push81=, main.fh+28($pop163) - tee_local $push162=, $4=, $pop81 - i32.select $push83=, $pop162, $10, $8 - tee_local $push161=, $9=, $pop83 - i32.const $push160=, 0 - i32.load $push82=, main.fh+32($pop160):p2align=4 - tee_local $push159=, $0=, $pop82 - i32.select $push84=, $pop159, $12, $3 - tee_local $push158=, $8=, $pop84 - i32.select $2=, $pop164, $pop161, $pop158 - i32.const $push86=, 31 - i32.shr_s $push87=, $2, $pop86 - tee_local $push157=, $3=, $pop87 - i32.add $push88=, $2, $pop157 - i32.xor $3=, $pop88, $3 - i32.select $9=, $1, $8, $9 - i32.const $push156=, 31 - i32.shr_s $push89=, $9, $pop156 - tee_local $push155=, $8=, $pop89 - i32.add $push90=, $9, $pop155 - i32.xor $8=, $pop90, $8 - block - i32.const $push175=, 0 - i32.eq $push176=, $2, $pop175 - br_if $pop176, 0 # 0: down to label4 -# BB#9: # %lor.lhs.false3 - i32.const $push165=, 4 - i32.shr_s $push79=, $3, $pop165 - i32.le_s $push91=, $8, $pop79 - br_if $pop91, 1 # 1: down to label2 -.LBB1_10: # %if.else.i40 - end_block # label4: - i32.const $push177=, 0 - i32.eq $push178=, $9, $pop177 - br_if $pop178, 0 # 0: down to label2 -# BB#11: # %if.else.i40 - i32.const $push93=, 4 - i32.shr_s $push92=, $8, $pop93 - i32.gt_s $push94=, $3, $pop92 - br_if $pop94, 0 # 0: down to label2 -# BB#12: # %line_hints.exit47 - i32.select $push10=, $1, $4, $0 - i32.const $push95=, 29 - i32.shr_u $push96=, $9, $pop95 - i32.const $push97=, 4 - i32.and $push98=, $pop96, $pop97 - i32.const $push168=, 4 - i32.add $push99=, $pop98, $pop168 - tee_local $push167=, $2=, $pop99 - i32.const $push100=, 12 - i32.xor $push101=, $pop167, $pop100 - i32.select $push102=, $pop10, $pop101, $2 - i32.const $push166=, 4 - i32.ne $push103=, $pop102, $pop166 - br_if $pop103, 0 # 0: down to label2 -# BB#13: # %if.end - i32.const $push104=, 0 - call exit@FUNCTION, $pop104 + i32.const $push1=, main.fh + i32.const $push0=, main.gsf + i32.const $push2=, main.gsf+8 + i32.call $push3=, line_hints@FUNCTION, $pop1, $pop0, $pop2 + i32.const $push4=, 1 + i32.ne $push5=, $pop3, $pop4 + br_if $pop5, 0 # 0: down to label2 +# BB#1: # %lor.lhs.false + i32.const $push6=, main.fh+12 + i32.const $push16=, main.gsf+16 + i32.const $push15=, main.gsf+24 + i32.call $push7=, line_hints@FUNCTION, $pop6, $pop16, $pop15 + i32.const $push8=, 8 + i32.ne $push9=, $pop7, $pop8 + br_if $pop9, 0 # 0: down to label2 +# BB#2: # %lor.lhs.false3 + i32.const $push10=, main.fh+24 + i32.const $push18=, main.gsf+16 + i32.const $push17=, main.gsf+24 + i32.call $push11=, line_hints@FUNCTION, $pop10, $pop18, $pop17 + i32.const $push12=, 4 + i32.ne $push13=, $pop11, $pop12 + br_if $pop13, 0 # 0: down to label2 +# BB#3: # %if.end + i32.const $push14=, 0 + call exit@FUNCTION, $pop14 unreachable -.LBB1_14: # %if.then +.LBB1_4: # %if.then end_block # label2: call abort@FUNCTION unreachable diff --git a/test/torture-s/20020716-1.c.s b/test/torture-s/20020716-1.c.s index 624e4b891..f6639dcba 100644 --- a/test/torture-s/20020716-1.c.s +++ b/test/torture-s/20020716-1.c.s @@ -23,7 +23,7 @@ testcond: # @testcond # BB#0: # %entry i32.const $push1=, 0 i32.const $push0=, 5046272 - i32.select $push2=, $0, $pop1, $pop0 + i32.select $push2=, $pop1, $pop0, $0 return $pop2 .endfunc .Lfunc_end1: diff --git a/test/torture-s/20020916-1.c.s b/test/torture-s/20020916-1.c.s index 392c01c25..e6f8b5b9e 100644 --- a/test/torture-s/20020916-1.c.s +++ b/test/torture-s/20020916-1.c.s @@ -8,12 +8,12 @@ foo: # @foo .param i32 .result i32 # BB#0: # %entry - i32.const $push0=, 0 - i32.lt_s $push2=, $0, $pop0 i32.const $push3=, 1 + i32.const $push0=, 0 + i32.gt_s $push1=, $0, $pop0 i32.const $push5=, 0 - i32.gt_s $push1=, $0, $pop5 - i32.select $push4=, $pop2, $pop3, $pop1 + i32.lt_s $push2=, $0, $pop5 + i32.select $push4=, $pop3, $pop1, $pop2 return $pop4 .endfunc .Lfunc_end0: diff --git a/test/torture-s/20021010-2.c.s b/test/torture-s/20021010-2.c.s index 34c1e4e8b..0f1cd3aea 100644 --- a/test/torture-s/20021010-2.c.s +++ b/test/torture-s/20021010-2.c.s @@ -6,33 +6,29 @@ .type main,@function main: # @main .result i32 - .local i32, i32 + .local i32, i32, i32, i32 # BB#0: # %entry - block - i32.const $push19=, 0 - i32.load16_s $push1=, global_saveRect+2($pop19) - tee_local $push18=, $1=, $pop1 - i32.const $push17=, 0 - i32.load16_s $push3=, global_bounds+2($pop17) - tee_local $push16=, $0=, $pop3 - i32.gt_s $push6=, $pop18, $pop16 - i32.select $push7=, $pop6, $0, $1 - i32.const $push15=, 0 - i32.load16_s $push0=, global_saveRect($pop15) - tee_local $push14=, $1=, $pop0 - i32.const $push13=, 0 - i32.load16_s $push2=, global_bounds($pop13) - tee_local $push12=, $0=, $pop2 - i32.lt_s $push4=, $pop14, $pop12 - i32.select $push5=, $pop4, $0, $1 - i32.sub $push8=, $pop7, $pop5 i32.const $push11=, 0 - i32.load $push9=, expectedwidth($pop11) - i32.ne $push10=, $pop8, $pop9 - br_if $pop10, 0 # 0: down to label0 + i32.load16_s $0=, global_saveRect($pop11) + i32.const $push10=, 0 + i32.load16_s $2=, global_bounds($pop10) + i32.const $push9=, 0 + i32.load16_s $1=, global_saveRect+2($pop9) + i32.const $push8=, 0 + i32.load16_s $3=, global_bounds+2($pop8) + block + i32.gt_s $push2=, $1, $3 + i32.select $push3=, $3, $1, $pop2 + i32.lt_s $push0=, $0, $2 + i32.select $push1=, $2, $0, $pop0 + i32.sub $push4=, $pop3, $pop1 + i32.const $push7=, 0 + i32.load $push5=, expectedwidth($pop7) + i32.ne $push6=, $pop4, $pop5 + br_if $pop6, 0 # 0: down to label0 # BB#1: # %if.end26 - i32.const $push20=, 0 - call exit@FUNCTION, $pop20 + i32.const $push12=, 0 + call exit@FUNCTION, $pop12 unreachable .LBB0_2: # %if.then25 end_block # label0: diff --git a/test/torture-s/20021204-1.c.s b/test/torture-s/20021204-1.c.s index 0add0faa5..e1069cdc9 100644 --- a/test/torture-s/20021204-1.c.s +++ b/test/torture-s/20021204-1.c.s @@ -29,13 +29,13 @@ main: # @main .param i32, i32 .result i32 # BB#0: # %entry + i32.const $push4=, 2 + i32.const $push3=, 1 i32.const $push0=, 0 i32.load $push1=, z($pop0) i32.const $push7=, 0 i32.gt_s $push2=, $pop1, $pop7 - i32.const $push4=, 2 - i32.const $push3=, 1 - i32.select $push5=, $pop2, $pop4, $pop3 + i32.select $push5=, $pop4, $pop3, $pop2 call foo@FUNCTION, $pop5 i32.const $push6=, 0 call exit@FUNCTION, $pop6 diff --git a/test/torture-s/20030120-1.c.s b/test/torture-s/20030120-1.c.s index 6a3b91bee..0697a380f 100644 --- a/test/torture-s/20030120-1.c.s +++ b/test/torture-s/20030120-1.c.s @@ -9,7 +9,7 @@ test1: # @test1 .result i32 # BB#0: # %entry i32.const $push0=, 2 - i32.select $push1=, $0, $0, $pop0 + i32.select $push1=, $0, $pop0, $0 return $pop1 .endfunc .Lfunc_end0: @@ -24,7 +24,7 @@ test2: # @test2 .result i32 # BB#0: # %entry i32.const $push0=, 2 - i32.select $push1=, $0, $0, $pop0 + i32.select $push1=, $0, $pop0, $0 return $pop1 .endfunc .Lfunc_end1: @@ -39,11 +39,11 @@ test3: # @test3 .result i32 # BB#0: # %entry i32.const $push0=, 1 - i32.and $push1=, $0, $pop0 - i32.const $push5=, 1 i32.const $push2=, 0 i32.ne $push3=, $0, $pop2 - i32.select $push4=, $pop1, $pop5, $pop3 + i32.const $push5=, 1 + i32.and $push1=, $0, $pop5 + i32.select $push4=, $pop0, $pop3, $pop1 return $pop4 .endfunc .Lfunc_end2: diff --git a/test/torture-s/20030120-2.c.s b/test/torture-s/20030120-2.c.s index 75b2f19bb..02bcd1003 100644 --- a/test/torture-s/20030120-2.c.s +++ b/test/torture-s/20030120-2.c.s @@ -9,15 +9,15 @@ foo: # @foo .result i32 # BB#0: # %entry i32.const $push5=, 4 - i32.eq $push6=, $0, $pop5 - i32.const $push9=, 4 i32.const $push2=, 3 - i32.eq $push3=, $0, $pop2 - i32.const $push8=, 3 i32.const $push0=, 1 i32.eq $push1=, $0, $pop0 - i32.select $push4=, $pop3, $pop8, $pop1 - i32.select $push7=, $pop6, $pop9, $pop4 + i32.const $push9=, 3 + i32.eq $push3=, $0, $pop9 + i32.select $push4=, $pop2, $pop1, $pop3 + i32.const $push8=, 4 + i32.eq $push6=, $0, $pop8 + i32.select $push7=, $pop5, $pop4, $pop6 return $pop7 .endfunc .Lfunc_end0: diff --git a/test/torture-s/20030717-1.c.s b/test/torture-s/20030717-1.c.s index e9810da15..d928dcfe9 100644 --- a/test/torture-s/20030717-1.c.s +++ b/test/torture-s/20030717-1.c.s @@ -54,7 +54,7 @@ bar: # @bar i32.add $push13=, $4, $pop30 i32.xor $push14=, $pop13, $8 i32.lt_u $push15=, $pop14, $3 - i32.select $5=, $pop15, $1, $5 + i32.select $5=, $1, $5, $pop15 i32.ne $push16=, $1, $6 br_if $pop16, 0 # 0: up to label0 # BB#4: # %do.end diff --git a/test/torture-s/20030916-1.c.s b/test/torture-s/20030916-1.c.s deleted file mode 100644 index 56295d490..000000000 --- a/test/torture-s/20030916-1.c.s +++ /dev/null @@ -1,120 +0,0 @@ - .text - .file "/b/build/slave/linux/build/src/src/work/gcc/gcc/testsuite/gcc.c-torture/execute/20030916-1.c" - .section .text.f,"ax",@progbits - .hidden f - .globl f - .type f,@function -f: # @f - .param i32 -# BB#0: # %entry - i32.const $push0=, 0 - i32.store $push1=, 992($0), $pop0 - i32.store $push2=, 996($0), $pop1 - i32.store $push3=, 1000($0), $pop2 - i32.store $push4=, 1004($0), $pop3 - i32.store $push5=, 1008($0), $pop4 - i32.store $push6=, 1012($0), $pop5 - i32.store $push7=, 1016($0), $pop6 - i32.store $push8=, 1020($0), $pop7 - i32.store $push9=, 0($0), $pop8 - i32.store $push10=, 4($0), $pop9 - i32.store $push11=, 8($0), $pop10 - i32.store $push12=, 12($0), $pop11 - i32.store $push13=, 16($0), $pop12 - i32.store $push14=, 20($0), $pop13 - i32.store $push15=, 24($0), $pop14 - i32.store $discard=, 28($0), $pop15 - return - .endfunc -.Lfunc_end0: - .size f, .Lfunc_end0-f - - .section .text.main,"ax",@progbits - .hidden main - .globl main - .type main,@function -main: # @main - .result i32 - .local i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 -# BB#0: # %entry - i32.const $6=, __stack_pointer - i32.load $6=, 0($6) - i32.const $7=, 1024 - i32.sub $12=, $6, $7 - i32.const $7=, __stack_pointer - i32.store $12=, 0($7), $12 - i32.const $4=, 0 -.LBB1_1: # %for.body - # =>This Inner Loop Header: Depth=1 - loop # label0: - i32.const $8=, 0 - i32.add $8=, $12, $8 - i32.add $push0=, $8, $4 - i32.const $push1=, 1 - i32.store $5=, 0($pop0), $pop1 - i32.const $0=, 4 - i32.add $4=, $4, $0 - i32.const $push2=, 1024 - i32.ne $push3=, $4, $pop2 - br_if $pop3, 0 # 0: up to label0 -# BB#2: # %for.end - end_loop # label1: - i32.const $push7=, 0 - i32.store $push8=, 1016($12), $pop7 - i32.store $push9=, 1020($12), $pop8 - i32.store $2=, 0($12), $pop9 - i32.const $9=, 0 - i32.add $9=, $12, $9 - i32.or $4=, $9, $0 - i32.store $discard=, 0($4), $2 - i32.const $push10=, 8 - i32.const $10=, 0 - i32.add $10=, $12, $10 - i32.or $push11=, $10, $pop10 - i32.store $discard=, 0($pop11), $2 - i32.const $push12=, 12 - i32.const $11=, 0 - i32.add $11=, $12, $11 - i32.or $push13=, $11, $pop12 - i32.store $discard=, 0($pop13), $2 - i64.const $push4=, 0 - i64.store $push5=, 992($12), $pop4 - i64.store $push6=, 1000($12), $pop5 - i64.store $discard=, 1008($12), $pop6 - i32.store $push14=, 16($12), $2 - i32.store $push15=, 20($12), $pop14 - i32.store $push16=, 24($12), $pop15 - i32.store $1=, 28($12), $pop16 -.LBB1_3: # %for.cond1 - # =>This Inner Loop Header: Depth=1 - block - loop # label3: - i32.const $push17=, 255 - i32.gt_s $push18=, $5, $pop17 - br_if $pop18, 2 # 2: down to label2 -# BB#4: # %for.cond1.for.body3_crit_edge - # in Loop: Header=BB1_3 Depth=1 - i32.load $2=, 0($4) - i32.const $push19=, -8 - i32.add $3=, $5, $pop19 - i32.const $push23=, 1 - i32.add $5=, $5, $pop23 - i32.add $4=, $4, $0 - i32.const $push20=, 240 - i32.lt_u $push21=, $3, $pop20 - i32.eq $push22=, $2, $pop21 - br_if $pop22, 0 # 0: up to label3 -# BB#5: # %if.then - end_loop # label4: - call abort@FUNCTION - unreachable -.LBB1_6: # %for.end10 - end_block # label2: - call exit@FUNCTION, $1 - unreachable - .endfunc -.Lfunc_end1: - .size main, .Lfunc_end1-main - - - .ident "clang version 3.9.0 " diff --git a/test/torture-s/20031010-1.c.s b/test/torture-s/20031010-1.c.s index 6c6b21ab8..ddab5d76e 100644 --- a/test/torture-s/20031010-1.c.s +++ b/test/torture-s/20031010-1.c.s @@ -19,8 +19,8 @@ foo: # @foo i32.eq $push5=, $3, $pop4 br_if $pop5, 0 # 0: down to label1 # BB#2: # %if.then4 - i32.select $push1=, $4, $1, $0 - i32.select $push0=, $4, $0, $1 + i32.select $push1=, $1, $0, $4 + i32.select $push0=, $0, $1, $4 i32.sub $2=, $pop1, $pop0 .LBB0_3: # %if.end8 end_block # label1: diff --git a/test/torture-s/20031214-1.c.s b/test/torture-s/20031214-1.c.s index 1dcf25dfa..3e5f338de 100644 --- a/test/torture-s/20031214-1.c.s +++ b/test/torture-s/20031214-1.c.s @@ -18,28 +18,24 @@ b: # @b .type main,@function main: # @main .result i32 - .local i32, i32 + .local i32, i32, i32 # BB#0: # %entry i32.const $push0=, 0 - i32.const $push17=, 0 - i32.load $push1=, k($pop17) - tee_local $push16=, $1=, $pop1 - i32.const $push15=, 0 - i32.load $push2=, g+8($pop15):p2align=3 - tee_local $push14=, $0=, $pop2 - i32.gt_s $push3=, $pop16, $pop14 - i32.select $push4=, $pop3, $1, $0 - tee_local $push13=, $1=, $pop4 - i32.const $push12=, 0 - i32.load $push5=, g+12($pop12) - tee_local $push11=, $0=, $pop5 - i32.gt_s $push6=, $pop13, $pop11 - i32.select $push7=, $pop6, $1, $0 - i32.const $push8=, 1 - i32.add $push9=, $pop7, $pop8 - i32.store $discard=, k($pop0), $pop9 - i32.const $push10=, 0 - return $pop10 + i32.load $0=, k($pop0) + i32.const $push9=, 0 + i32.load $1=, g+8($pop9):p2align=3 + i32.const $push8=, 0 + i32.load $2=, g+12($pop8) + i32.gt_s $push1=, $0, $1 + i32.select $0=, $0, $1, $pop1 + i32.const $push7=, 0 + i32.gt_s $push2=, $0, $2 + i32.select $push3=, $0, $2, $pop2 + i32.const $push4=, 1 + i32.add $push5=, $pop3, $pop4 + i32.store $discard=, k($pop7), $pop5 + i32.const $push6=, 0 + return $pop6 .endfunc .Lfunc_end1: .size main, .Lfunc_end1-main diff --git a/test/torture-s/20040319-1.c.s b/test/torture-s/20040319-1.c.s index 2faeafece..45f545bf6 100644 --- a/test/torture-s/20040319-1.c.s +++ b/test/torture-s/20040319-1.c.s @@ -8,12 +8,12 @@ blah: # @blah .param i32 .result i32 # BB#0: # %entry - i32.const $push0=, -1 - i32.gt_s $push1=, $0, $pop0 i32.const $push4=, 1 i32.const $push2=, 0 i32.sub $push3=, $pop2, $0 - i32.select $push5=, $pop1, $pop4, $pop3 + i32.const $push0=, -1 + i32.gt_s $push1=, $0, $pop0 + i32.select $push5=, $pop4, $pop3, $pop1 return $pop5 .endfunc .Lfunc_end0: diff --git a/test/torture-s/20040411-1.c.s b/test/torture-s/20040411-1.c.s index e4ecc0574..cc7582b2e 100644 --- a/test/torture-s/20040411-1.c.s +++ b/test/torture-s/20040411-1.c.s @@ -9,15 +9,15 @@ sub1: # @sub1 .result i32 # BB#0: # %entry i32.const $push0=, 2 - i32.eq $push2=, $1, $pop0 - i32.const $push9=, 2 - i32.add $push1=, $0, $pop9 - tee_local $push8=, $1=, $pop1 - i32.const $push7=, 2 - i32.shl $push3=, $pop8, $pop7 + i32.add $push1=, $0, $pop0 + tee_local $push9=, $0=, $pop1 + i32.const $push8=, 2 + i32.shl $push3=, $pop9, $pop8 i32.const $push4=, 12 - i32.mul $push5=, $1, $pop4 - i32.select $push6=, $pop2, $pop3, $pop5 + i32.mul $push5=, $0, $pop4 + i32.const $push7=, 2 + i32.eq $push2=, $1, $pop7 + i32.select $push6=, $pop3, $pop5, $pop2 return $pop6 .endfunc .Lfunc_end0: diff --git a/test/torture-s/20040703-1.c.s b/test/torture-s/20040703-1.c.s index 17ee6d540..6da435164 100644 --- a/test/torture-s/20040703-1.c.s +++ b/test/torture-s/20040703-1.c.s @@ -108,14 +108,14 @@ num_lshift: # @num_lshift br_if $pop47, 0 # 0: down to label9 # BB#13: # %if.else8.i i32.const $10=, 0 + i32.const $push61=, -1 + i32.const $push100=, 0 i32.const $push58=, 1 i32.const $push56=, -33 i32.add $push57=, $2, $pop56 i32.shl $push59=, $pop58, $pop57 i32.and $push60=, $8, $pop59 - i32.const $push61=, -1 - i32.const $push100=, 0 - i32.select $11=, $pop60, $pop61, $pop100 + i32.select $11=, $pop61, $pop100, $pop60 i32.const $push62=, 63 i32.gt_u $push63=, $2, $pop62 br_if $pop63, 2 # 2: down to label7 @@ -123,14 +123,14 @@ num_lshift: # @num_lshift .LBB0_14: # %if.else3.i end_block # label9: i32.const $10=, 1 - i32.const $push99=, 1 i32.const $push48=, -1 - i32.add $push49=, $2, $pop48 + i32.const $push52=, 0 + i32.const $push99=, 1 + i32.const $push98=, -1 + i32.add $push49=, $2, $pop98 i32.shl $push50=, $pop99, $pop49 i32.and $push51=, $7, $pop50 - i32.const $push98=, -1 - i32.const $push52=, 0 - i32.select $11=, $pop51, $pop98, $pop52 + i32.select $11=, $pop48, $pop52, $pop51 i32.const $push53=, 31 i32.gt_u $push54=, $2, $pop53 br_if $pop54, 0 # 0: down to label8 @@ -151,12 +151,12 @@ num_lshift: # @num_lshift i32.const $push67=, 31 i32.gt_u $push68=, $3, $pop67 tee_local $push102=, $12=, $pop68 - i32.select $9=, $pop102, $8, $7 - i32.select $8=, $12, $11, $8 + i32.select $9=, $8, $7, $pop102 + i32.select $8=, $11, $8, $12 block i32.const $push69=, -32 i32.add $push70=, $3, $pop69 - i32.select $push3=, $12, $pop70, $3 + i32.select $push3=, $pop70, $3, $12 tee_local $push101=, $3=, $pop3 i32.const $push110=, 0 i32.eq $push111=, $pop101, $pop110 diff --git a/test/torture-s/20041019-1.c.s b/test/torture-s/20041019-1.c.s index 101357bd6..ddfd8bee7 100644 --- a/test/torture-s/20041019-1.c.s +++ b/test/torture-s/20041019-1.c.s @@ -15,18 +15,18 @@ test_store_ccp: # @test_store_ccp i32.sub $7=, $1, $2 i32.const $2=, __stack_pointer i32.store $7=, 0($2), $7 - i32.const $push0=, 5 - i32.lt_s $push1=, $0, $pop0 i32.const $push2=, 8 i32.gt_s $push3=, $0, $pop2 i32.const $4=, 8 i32.add $4=, $7, $4 i32.const $5=, 4 i32.add $5=, $7, $5 - i32.select $push4=, $pop3, $4, $5 + i32.select $push4=, $4, $5, $pop3 + i32.const $push0=, 5 + i32.lt_s $push1=, $0, $pop0 i32.const $6=, 12 i32.add $6=, $7, $6 - i32.select $push5=, $pop1, $6, $pop4 + i32.select $push5=, $6, $pop4, $pop1 tee_local $push11=, $0=, $pop5 i32.const $push6=, 10 i32.store $discard=, 0($pop11), $pop6 @@ -59,18 +59,18 @@ test_store_copy_prop: # @test_store_copy_prop i32.sub $8=, $2, $3 i32.const $3=, __stack_pointer i32.store $8=, 0($3), $8 - i32.const $push0=, 5 - i32.lt_s $push1=, $0, $pop0 i32.const $push2=, 8 i32.gt_s $push3=, $0, $pop2 i32.const $5=, 8 i32.add $5=, $8, $5 i32.const $6=, 4 i32.add $6=, $8, $6 - i32.select $push4=, $pop3, $5, $6 + i32.select $push4=, $5, $6, $pop3 + i32.const $push0=, 5 + i32.lt_s $push1=, $0, $pop0 i32.const $7=, 12 i32.add $7=, $8, $7 - i32.select $push5=, $pop1, $7, $pop4 + i32.select $push5=, $7, $pop4, $pop1 tee_local $push10=, $1=, $pop5 i32.store $push6=, 0($pop10), $0 i32.const $push7=, 1 diff --git a/test/torture-s/20041112-1.c.s b/test/torture-s/20041112-1.c.s index 19a5e9ad8..34952aec1 100644 --- a/test/torture-s/20041112-1.c.s +++ b/test/torture-s/20041112-1.c.s @@ -6,25 +6,25 @@ .type bar,@function bar: # @bar .result i32 - .local i32, i32 + .local i32 # BB#0: # %entry i32.const $push0=, 0 i32.const $push18=, 0 i32.load $push1=, global($pop18) - tee_local $push17=, $1=, $pop1 - i32.const $push16=, 0 - i32.ne $push3=, $pop17, $pop16 + tee_local $push17=, $0=, $pop1 + i32.const $push7=, 1 + i32.add $push8=, $pop17, $pop7 + i32.const $push9=, 2 + i32.select $push10=, $pop8, $pop9, $0 + i32.const $push16=, 1 + i32.const $push15=, 0 + i32.ne $push3=, $0, $pop15 i32.const $push2=, global i32.const $push4=, -1 i32.eq $push5=, $pop2, $pop4 i32.or $push6=, $pop3, $pop5 - tee_local $push15=, $0=, $pop6 - i32.const $push7=, 1 - i32.add $push8=, $1, $pop7 - i32.const $push9=, 2 - i32.select $push10=, $1, $pop8, $pop9 - i32.const $push14=, 1 - i32.select $push11=, $pop15, $pop10, $pop14 + tee_local $push14=, $0=, $pop6 + i32.select $push11=, $pop10, $pop16, $pop14 i32.store $discard=, global($pop0), $pop11 i32.const $push13=, 1 i32.xor $push12=, $0, $pop13 diff --git a/test/torture-s/20050111-1.c.s b/test/torture-s/20050111-1.c.s index 1183e5f60..f07c36d3b 100644 --- a/test/torture-s/20050111-1.c.s +++ b/test/torture-s/20050111-1.c.s @@ -8,13 +8,13 @@ foo: # @foo .param i64 .result i32 # BB#0: # %entry - i64.const $push0=, 0 - i64.eq $push1=, $0, $pop0 i32.const $push5=, 0 i64.const $push2=, 32 i64.shr_u $push3=, $0, $pop2 i32.wrap/i64 $push4=, $pop3 - i32.select $push6=, $pop1, $pop5, $pop4 + i64.const $push0=, 0 + i64.eq $push1=, $0, $pop0 + i32.select $push6=, $pop5, $pop4, $pop1 return $pop6 .endfunc .Lfunc_end0: diff --git a/test/torture-s/20050124-1.c.s b/test/torture-s/20050124-1.c.s index 3cbe6995c..9289bd98b 100644 --- a/test/torture-s/20050124-1.c.s +++ b/test/torture-s/20050124-1.c.s @@ -28,7 +28,7 @@ foo: # @foo end_block # label1: i32.const $push3=, -1 i32.lt_s $push4=, $0, $pop3 - i32.select $push5=, $pop4, $0, $2 + i32.select $push5=, $0, $2, $pop4 return $pop5 .LBB0_4: # %if.end5 end_block # label0: diff --git a/test/torture-s/20051110-1.c.s b/test/torture-s/20051110-1.c.s index a1374ec20..74a6488d2 100644 --- a/test/torture-s/20051110-1.c.s +++ b/test/torture-s/20051110-1.c.s @@ -21,14 +21,14 @@ add_unwind_adjustsp: # @add_unwind_adjustsp .LBB0_1: # %while.body # =>This Inner Loop Header: Depth=1 loop # label1: - i32.const $push6=, 7 - i32.shr_u $push0=, $0, $pop6 - tee_local $push13=, $2=, $pop0 i32.const $push7=, 128 i32.or $push8=, $0, $pop7 i32.const $push4=, 127 i32.and $push5=, $0, $pop4 - i32.select $push9=, $pop13, $pop8, $pop5 + i32.const $push6=, 7 + i32.shr_u $push0=, $0, $pop6 + tee_local $push13=, $2=, $pop0 + i32.select $push9=, $pop8, $pop5, $pop13 i32.store8 $discard=, 0($1), $pop9 i32.const $push10=, 1 i32.add $1=, $1, $pop10 @@ -55,14 +55,14 @@ main: # @main .LBB1_1: # %while.body.i # =>This Inner Loop Header: Depth=1 loop # label3: - i32.const $push17=, 7 - i32.shr_u $push0=, $1, $pop17 - tee_local $push16=, $2=, $pop0 - i32.const $push15=, 128 - i32.or $push2=, $1, $pop15 - i32.const $push14=, 127 - i32.and $push1=, $1, $pop14 - i32.select $push3=, $pop16, $pop2, $pop1 + i32.const $push17=, 128 + i32.or $push2=, $1, $pop17 + i32.const $push16=, 127 + i32.and $push1=, $1, $pop16 + i32.const $push15=, 7 + i32.shr_u $push0=, $1, $pop15 + tee_local $push14=, $2=, $pop0 + i32.select $push3=, $pop2, $pop1, $pop14 i32.store8 $discard=, 0($0), $pop3 i32.const $push13=, 1 i32.add $0=, $0, $pop13 diff --git a/test/torture-s/20051215-1.c.s b/test/torture-s/20051215-1.c.s index 12a6fa272..358aefe0c 100644 --- a/test/torture-s/20051215-1.c.s +++ b/test/torture-s/20051215-1.c.s @@ -32,11 +32,11 @@ foo: # @foo .LBB0_4: # %if.end # in Loop: Header=BB0_2 Depth=1 end_block # label3: - i32.const $push9=, 0 - i32.gt_s $push2=, $0, $pop9 i32.mul $push3=, $4, $0 + i32.const $push9=, 0 i32.const $push8=, 0 - i32.select $push4=, $pop2, $pop3, $pop8 + i32.gt_s $push2=, $0, $pop8 + i32.select $push4=, $pop3, $pop9, $pop2 i32.add $5=, $5, $pop4 i32.const $push7=, 1 i32.add $3=, $3, $pop7 diff --git a/test/torture-s/20060930-1.c.s b/test/torture-s/20060930-1.c.s index 2606875ce..c8ab5350f 100644 --- a/test/torture-s/20060930-1.c.s +++ b/test/torture-s/20060930-1.c.s @@ -35,17 +35,17 @@ foo: # @foo br_if $pop5, 0 # 0: down to label1 # BB#1: # %for.body.lr.ph i32.const $push1=, 0 - i32.gt_s $push2=, $0, $pop1 i32.const $push12=, 0 - i32.sub $push3=, $pop12, $0 - i32.select $push0=, $pop2, $pop3, $0 - tee_local $push11=, $0=, $pop0 - i32.const $push10=, -1 - i32.gt_s $push6=, $pop11, $pop10 - i32.const $push9=, 0 - i32.const $push8=, 0 - i32.sub $push7=, $pop8, $0 - i32.select $0=, $pop6, $pop9, $pop7 + i32.const $push11=, 0 + i32.sub $push3=, $pop11, $0 + i32.const $push10=, 0 + i32.gt_s $push2=, $0, $pop10 + i32.select $push0=, $pop3, $0, $pop2 + tee_local $push9=, $0=, $pop0 + i32.sub $push7=, $pop12, $pop9 + i32.const $push8=, -1 + i32.gt_s $push6=, $0, $pop8 + i32.select $0=, $pop1, $pop7, $pop6 .LBB1_2: # %for.body # =>This Inner Loop Header: Depth=1 loop # label2: diff --git a/test/torture-s/20061101-1.c.s b/test/torture-s/20061101-1.c.s index 448874f95..fba815bb6 100644 --- a/test/torture-s/20061101-1.c.s +++ b/test/torture-s/20061101-1.c.s @@ -46,10 +46,10 @@ bug: # @bug br_if $pop10, 2 # 2: down to label1 # BB#2: # %while.body # in Loop: Header=BB1_1 Depth=1 - i32.lt_s $push3=, $0, $2 i32.const $push8=, 1 i32.add $push2=, $0, $pop8 - i32.select $0=, $pop3, $pop2, $2 + i32.lt_s $push3=, $0, $2 + i32.select $0=, $pop2, $2, $pop3 i32.const $3=, 0 i32.mul $push4=, $0, $1 i32.const $push7=, 36863 diff --git a/test/torture-s/20061101-2.c.s b/test/torture-s/20061101-2.c.s index e6ac8dc9d..f6f3e9e03 100644 --- a/test/torture-s/20061101-2.c.s +++ b/test/torture-s/20061101-2.c.s @@ -46,10 +46,10 @@ bug: # @bug br_if $pop10, 2 # 2: down to label1 # BB#2: # %while.body # in Loop: Header=BB1_1 Depth=1 - i32.lt_s $push3=, $0, $2 i32.const $push8=, 1 i32.add $push2=, $0, $pop8 - i32.select $0=, $pop3, $pop2, $2 + i32.lt_s $push3=, $0, $2 + i32.select $0=, $pop2, $2, $pop3 i32.const $3=, 0 i32.mul $push4=, $0, $1 i32.const $push7=, 36863 diff --git a/test/torture-s/20070212-1.c.s b/test/torture-s/20070212-1.c.s index 987eddffe..2f367d4d2 100644 --- a/test/torture-s/20070212-1.c.s +++ b/test/torture-s/20070212-1.c.s @@ -20,7 +20,7 @@ g: # @g i32.store $discard=, 12($8), $0 i32.const $7=, 12 i32.add $7=, $8, $7 - i32.select $push0=, $1, $7, $2 + i32.select $push0=, $7, $2, $1 i32.load $push2=, 0($pop0) i32.const $6=, 16 i32.add $8=, $8, $6 diff --git a/test/torture-s/20070212-2.c.s b/test/torture-s/20070212-2.c.s index ece4c63c6..19f21de8c 100644 --- a/test/torture-s/20070212-2.c.s +++ b/test/torture-s/20070212-2.c.s @@ -9,7 +9,7 @@ f: # @f .result i32 # BB#0: # %entry i32.const $push0=, 0 - i32.select $push1=, $0, $pop0, $2 + i32.select $push1=, $pop0, $2, $0 return $pop1 .endfunc .Lfunc_end0: diff --git a/test/torture-s/20070212-3.c.s b/test/torture-s/20070212-3.c.s index 049c51f4b..a030e0be8 100644 --- a/test/torture-s/20070212-3.c.s +++ b/test/torture-s/20070212-3.c.s @@ -11,7 +11,7 @@ bar: # @bar # BB#0: # %entry i32.const $push1=, 4 i32.add $push2=, $0, $pop1 - i32.select $push0=, $2, $0, $pop2 + i32.select $push0=, $0, $pop2, $2 tee_local $push5=, $4=, $pop0 i32.load $2=, 0($pop5) i32.const $push3=, 1 diff --git a/test/torture-s/20070623-1.c.s b/test/torture-s/20070623-1.c.s index e8f897c41..1c33952f5 100644 --- a/test/torture-s/20070623-1.c.s +++ b/test/torture-s/20070623-1.c.s @@ -8,10 +8,10 @@ nge: # @nge .param i32, i32 .result i32 # BB#0: # %entry - i32.ge_s $push0=, $0, $1 i32.const $push2=, -1 i32.const $push1=, 0 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.ge_s $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end0: @@ -25,10 +25,10 @@ ngt: # @ngt .param i32, i32 .result i32 # BB#0: # %entry - i32.gt_s $push0=, $0, $1 i32.const $push2=, -1 i32.const $push1=, 0 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.gt_s $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end1: @@ -42,10 +42,10 @@ nle: # @nle .param i32, i32 .result i32 # BB#0: # %entry - i32.le_s $push0=, $0, $1 i32.const $push2=, -1 i32.const $push1=, 0 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.le_s $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end2: @@ -59,10 +59,10 @@ nlt: # @nlt .param i32, i32 .result i32 # BB#0: # %entry - i32.lt_s $push0=, $0, $1 i32.const $push2=, -1 i32.const $push1=, 0 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.lt_s $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end3: @@ -76,10 +76,10 @@ neq: # @neq .param i32, i32 .result i32 # BB#0: # %entry - i32.eq $push0=, $0, $1 i32.const $push2=, -1 i32.const $push1=, 0 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.eq $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end4: @@ -93,10 +93,10 @@ nne: # @nne .param i32, i32 .result i32 # BB#0: # %entry - i32.ne $push0=, $0, $1 i32.const $push2=, -1 i32.const $push1=, 0 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.ne $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end5: @@ -110,10 +110,10 @@ ngeu: # @ngeu .param i32, i32 .result i32 # BB#0: # %entry - i32.ge_u $push0=, $0, $1 i32.const $push2=, -1 i32.const $push1=, 0 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.ge_u $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end6: @@ -127,10 +127,10 @@ ngtu: # @ngtu .param i32, i32 .result i32 # BB#0: # %entry - i32.gt_u $push0=, $0, $1 i32.const $push2=, -1 i32.const $push1=, 0 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.gt_u $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end7: @@ -144,10 +144,10 @@ nleu: # @nleu .param i32, i32 .result i32 # BB#0: # %entry - i32.le_u $push0=, $0, $1 i32.const $push2=, -1 i32.const $push1=, 0 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.le_u $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end8: @@ -161,10 +161,10 @@ nltu: # @nltu .param i32, i32 .result i32 # BB#0: # %entry - i32.lt_u $push0=, $0, $1 i32.const $push2=, -1 i32.const $push1=, 0 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.lt_u $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end9: diff --git a/test/torture-s/20071030-1.c.s b/test/torture-s/20071030-1.c.s index 0c250cde8..7f14bc6e3 100644 --- a/test/torture-s/20071030-1.c.s +++ b/test/torture-s/20071030-1.c.s @@ -32,11 +32,11 @@ CalcPing: # @CalcPing i32.add $push4=, $0, $1 f32.load $push5=, 0($pop4):p2align=3 tee_local $push20=, $6=, $pop5 + f32.add $push7=, $3, $pop20 f32.const $push19=, 0x0p0 - f32.gt $push6=, $pop20, $pop19 + f32.gt $push6=, $6, $pop19 tee_local $push18=, $5=, $pop6 - f32.add $push7=, $3, $6 - f32.select $3=, $pop18, $pop7, $3 + f32.select $3=, $pop7, $3, $pop18 i32.add $2=, $5, $2 i32.const $push8=, 24 i32.add $1=, $1, $pop8 @@ -98,11 +98,11 @@ main: # @main i32.add $push3=, $10, $0 f32.load $push4=, 0($pop3):p2align=3 tee_local $push22=, $4=, $pop4 + f32.add $push6=, $2, $pop22 f32.const $push21=, 0x0p0 - f32.gt $push5=, $pop22, $pop21 + f32.gt $push5=, $4, $pop21 tee_local $push20=, $3=, $pop5 - f32.add $push6=, $2, $4 - f32.select $2=, $pop20, $pop6, $2 + f32.select $2=, $pop6, $2, $pop20 i32.add $1=, $3, $1 i32.const $push19=, 24 i32.add $0=, $0, $pop19 diff --git a/test/torture-s/20071216-1.c.s b/test/torture-s/20071216-1.c.s index 5e4fcb3c1..5fab54294 100644 --- a/test/torture-s/20071216-1.c.s +++ b/test/torture-s/20071216-1.c.s @@ -22,17 +22,16 @@ foo: # @foo .result i32 .local i32 # BB#0: # %entry - i32.call $push0=, bar@FUNCTION - tee_local $push9=, $0=, $pop0 - i32.const $push1=, -4095 - i32.lt_u $push2=, $pop9, $pop1 - i32.const $push3=, -38 - i32.eq $push4=, $0, $pop3 - i32.const $push6=, -37 - i32.const $push5=, -1 - i32.select $push7=, $pop4, $pop6, $pop5 - i32.select $push8=, $pop2, $0, $pop7 - return $pop8 + i32.call $0=, bar@FUNCTION + i32.const $push5=, -37 + i32.const $push4=, -1 + i32.const $push2=, -38 + i32.eq $push3=, $0, $pop2 + i32.select $push6=, $pop5, $pop4, $pop3 + i32.const $push0=, -4095 + i32.lt_u $push1=, $0, $pop0 + i32.select $push7=, $0, $pop6, $pop1 + return $pop7 .endfunc .Lfunc_end1: .size foo, .Lfunc_end1-foo @@ -45,60 +44,57 @@ main: # @main .result i32 .local i32, i32 # BB#0: # %entry - block - i32.const $push30=, 0 + i32.const $push25=, 0 i32.const $push0=, 26 - i32.store $push1=, x($pop30), $pop0 - i32.call $push2=, bar@FUNCTION - tee_local $push29=, $1=, $pop2 - i32.const $push28=, -4095 - i32.lt_u $push3=, $pop29, $pop28 - i32.const $push27=, -38 - i32.eq $push4=, $1, $pop27 - i32.const $push26=, -37 - i32.const $push25=, -1 - i32.select $push5=, $pop4, $pop26, $pop25 - i32.select $push6=, $pop3, $1, $pop5 - i32.ne $push7=, $pop1, $pop6 - br_if $pop7, 0 # 0: down to label0 + i32.store $0=, x($pop25), $pop0 + i32.call $1=, bar@FUNCTION + block + i32.const $push24=, -37 + i32.const $push23=, -1 + i32.const $push22=, -38 + i32.eq $push2=, $1, $pop22 + i32.select $push3=, $pop24, $pop23, $pop2 + i32.const $push21=, -4095 + i32.lt_u $push1=, $1, $pop21 + i32.select $push4=, $1, $pop3, $pop1 + i32.ne $push5=, $0, $pop4 + br_if $pop5, 0 # 0: down to label0 # BB#1: # %if.end - i32.const $push37=, 0 - i32.const $push8=, -39 - i32.store $discard=, x($pop37), $pop8 + i32.const $push31=, 0 + i32.const $push6=, -39 + i32.store $discard=, x($pop31), $pop6 + i32.call $1=, bar@FUNCTION block - i32.call $push9=, bar@FUNCTION - tee_local $push36=, $1=, $pop9 - i32.const $push35=, -4095 - i32.lt_u $push10=, $pop36, $pop35 - i32.const $push34=, -38 - i32.eq $push11=, $1, $pop34 - i32.const $push33=, -37 - i32.const $push32=, -1 - i32.select $push12=, $pop11, $pop33, $pop32 - i32.select $push13=, $pop10, $1, $pop12 - i32.const $push31=, -1 - i32.ne $push14=, $pop13, $pop31 - br_if $pop14, 0 # 0: down to label1 + i32.const $push30=, -37 + i32.const $push29=, -1 + i32.const $push28=, -38 + i32.eq $push8=, $1, $pop28 + i32.select $push9=, $pop30, $pop29, $pop8 + i32.const $push27=, -4095 + i32.lt_u $push7=, $1, $pop27 + i32.select $push10=, $1, $pop9, $pop7 + i32.const $push26=, -1 + i32.ne $push11=, $pop10, $pop26 + br_if $pop11, 0 # 0: down to label1 # BB#2: # %if.end4 - i32.const $push40=, 0 - i32.const $push15=, -38 - i32.store $0=, x($pop40), $pop15 + i32.const $push33=, 0 + i32.const $push12=, -38 + i32.store $0=, x($pop33), $pop12 + i32.call $1=, bar@FUNCTION block - i32.call $push16=, bar@FUNCTION - tee_local $push39=, $1=, $pop16 - i32.const $push17=, -4095 - i32.lt_u $push18=, $pop39, $pop17 - i32.eq $push19=, $1, $0 - i32.const $push21=, -37 - i32.const $push20=, -1 - i32.select $push22=, $pop19, $pop21, $pop20 - i32.select $push23=, $pop18, $1, $pop22 - i32.const $push38=, -37 - i32.ne $push24=, $pop23, $pop38 - br_if $pop24, 0 # 0: down to label2 + i32.const $push17=, -37 + i32.const $push16=, -1 + i32.eq $push15=, $1, $0 + i32.select $push18=, $pop17, $pop16, $pop15 + i32.const $push13=, -4095 + i32.lt_u $push14=, $1, $pop13 + i32.select $push19=, $1, $pop18, $pop14 + i32.const $push32=, -37 + i32.ne $push20=, $pop19, $pop32 + br_if $pop20, 0 # 0: down to label2 # BB#3: # %if.end8 - i32.const $push41=, 0 - return $pop41 + i32.const $push34=, 0 + return $pop34 .LBB2_4: # %if.then7 end_block # label2: call abort@FUNCTION diff --git a/test/torture-s/20080604-1.c.s b/test/torture-s/20080604-1.c.s index 8b2eb6c54..f8bd3c163 100644 --- a/test/torture-s/20080604-1.c.s +++ b/test/torture-s/20080604-1.c.s @@ -39,7 +39,7 @@ baz: # @baz i32.const $push0=, x i32.const $5=, 12 i32.add $5=, $6, $5 - i32.select $push1=, $0, $5, $pop0 + i32.select $push1=, $5, $pop0, $0 tee_local $push3=, $0=, $pop1 i32.const $push2=, .L.str i32.store $1=, 0($pop3), $pop2 diff --git a/test/torture-s/20080719-1.c.s b/test/torture-s/20080719-1.c.s index 8decf7c27..720c6032d 100644 --- a/test/torture-s/20080719-1.c.s +++ b/test/torture-s/20080719-1.c.s @@ -8,15 +8,15 @@ xxx: # @xxx .param i32 .result i32 # BB#0: # %entry - i32.const $push5=, 8 - i32.eq $push6=, $0, $pop5 i32.const $push7=, cfb_tab8_be - i32.const $push0=, 16 - i32.eq $push1=, $0, $pop0 i32.const $push3=, cfb_tab16_be i32.const $push2=, cfb_tab32 - i32.select $push4=, $pop1, $pop3, $pop2 - i32.select $push8=, $pop6, $pop7, $pop4 + i32.const $push0=, 16 + i32.eq $push1=, $0, $pop0 + i32.select $push4=, $pop3, $pop2, $pop1 + i32.const $push5=, 8 + i32.eq $push6=, $0, $pop5 + i32.select $push8=, $pop7, $pop4, $pop6 return $pop8 .endfunc .Lfunc_end0: diff --git a/test/torture-s/20100416-1.c.s b/test/torture-s/20100416-1.c.s index cca218895..4af5ad7b7 100644 --- a/test/torture-s/20100416-1.c.s +++ b/test/torture-s/20100416-1.c.s @@ -8,13 +8,13 @@ movegt: # @movegt .param i32, i32, i64 .result i32 # BB#0: # %entry - i32.const $push0=, 0 - i32.gt_s $push1=, $1, $pop0 i64.const $push2=, -1152921504606846977 i64.gt_s $push3=, $2, $pop2 - i32.select $push4=, $pop3, $0, $1 + i32.select $push4=, $0, $1, $pop3 + i32.const $push0=, 0 i32.const $push6=, 0 - i32.select $push5=, $pop1, $pop4, $pop6 + i32.gt_s $push1=, $1, $pop6 + i32.select $push5=, $pop4, $pop0, $pop1 return $pop5 .endfunc .Lfunc_end0: @@ -28,61 +28,61 @@ main: # @main .result i32 # BB#0: # %entry block - i32.const $push32=, 0 - i64.load $push0=, tests($pop32):p2align=4 - i64.const $push31=, -1152921504606846977 - i64.gt_s $push1=, $pop0, $pop31 - i32.const $push30=, -1 - i32.const $push29=, 1 - i32.select $push2=, $pop1, $pop30, $pop29 + i32.const $push32=, -1 + i32.const $push31=, 1 + i32.const $push30=, 0 + i64.load $push0=, tests($pop30):p2align=4 + i64.const $push29=, -1152921504606846977 + i64.gt_s $push1=, $pop0, $pop29 + i32.select $push2=, $pop32, $pop31, $pop1 i32.const $push28=, 0 i32.load $push3=, tests+8($pop28):p2align=3 i32.ne $push4=, $pop2, $pop3 br_if $pop4, 0 # 0: down to label0 # BB#1: # %for.cond - i32.const $push37=, 0 - i64.load $push5=, tests+16($pop37):p2align=4 - i64.const $push36=, -1152921504606846977 - i64.gt_s $push6=, $pop5, $pop36 - i32.const $push35=, -1 - i32.const $push34=, 1 - i32.select $push7=, $pop6, $pop35, $pop34 + i32.const $push37=, -1 + i32.const $push36=, 1 + i32.const $push35=, 0 + i64.load $push5=, tests+16($pop35):p2align=4 + i64.const $push34=, -1152921504606846977 + i64.gt_s $push6=, $pop5, $pop34 + i32.select $push7=, $pop37, $pop36, $pop6 i32.const $push33=, 0 i32.load $push8=, tests+24($pop33):p2align=3 i32.ne $push9=, $pop7, $pop8 br_if $pop9, 0 # 0: down to label0 # BB#2: # %for.cond.1 - i32.const $push42=, 0 - i64.load $push10=, tests+32($pop42):p2align=4 - i64.const $push41=, -1152921504606846977 - i64.gt_s $push11=, $pop10, $pop41 - i32.const $push40=, -1 - i32.const $push39=, 1 - i32.select $push12=, $pop11, $pop40, $pop39 + i32.const $push42=, -1 + i32.const $push41=, 1 + i32.const $push40=, 0 + i64.load $push10=, tests+32($pop40):p2align=4 + i64.const $push39=, -1152921504606846977 + i64.gt_s $push11=, $pop10, $pop39 + i32.select $push12=, $pop42, $pop41, $pop11 i32.const $push38=, 0 i32.load $push13=, tests+40($pop38):p2align=3 i32.ne $push14=, $pop12, $pop13 br_if $pop14, 0 # 0: down to label0 # BB#3: # %for.cond.2 - i32.const $push47=, 0 - i64.load $push15=, tests+48($pop47):p2align=4 - i64.const $push46=, -1152921504606846977 - i64.gt_s $push16=, $pop15, $pop46 - i32.const $push45=, -1 - i32.const $push44=, 1 - i32.select $push17=, $pop16, $pop45, $pop44 + i32.const $push47=, -1 + i32.const $push46=, 1 + i32.const $push45=, 0 + i64.load $push15=, tests+48($pop45):p2align=4 + i64.const $push44=, -1152921504606846977 + i64.gt_s $push16=, $pop15, $pop44 + i32.select $push17=, $pop47, $pop46, $pop16 i32.const $push43=, 0 i32.load $push18=, tests+56($pop43):p2align=3 i32.ne $push19=, $pop17, $pop18 br_if $pop19, 0 # 0: down to label0 # BB#4: # %for.cond.3 + i32.const $push24=, -1 + i32.const $push23=, 1 i32.const $push49=, 0 i64.load $push20=, tests+64($pop49):p2align=4 i64.const $push21=, -1152921504606846977 i64.gt_s $push22=, $pop20, $pop21 - i32.const $push24=, -1 - i32.const $push23=, 1 - i32.select $push25=, $pop22, $pop24, $pop23 + i32.select $push25=, $pop24, $pop23, $pop22 i32.const $push48=, 0 i32.load $push26=, tests+72($pop48):p2align=3 i32.ne $push27=, $pop25, $pop26 diff --git a/test/torture-s/20120427-1.c.s b/test/torture-s/20120427-1.c.s index 8806b8daf..e56fb553e 100644 --- a/test/torture-s/20120427-1.c.s +++ b/test/torture-s/20120427-1.c.s @@ -30,10 +30,10 @@ sreal_compare: # @sreal_compare i32.gt_u $push6=, $pop13, $pop12 br_if $pop6, 0 # 0: down to label0 # BB#3: # %if.end10 - i32.lt_u $push7=, $0, $1 i32.const $push9=, -1 i32.const $push8=, 0 - i32.select $2=, $pop7, $pop9, $pop8 + i32.lt_u $push7=, $0, $1 + i32.select $2=, $pop9, $pop8, $pop7 .LBB0_4: # %return end_block # label0: return $2 diff --git a/test/torture-s/20120427-2.c.s b/test/torture-s/20120427-2.c.s index d367abc32..299c6854a 100644 --- a/test/torture-s/20120427-2.c.s +++ b/test/torture-s/20120427-2.c.s @@ -30,10 +30,10 @@ sreal_compare: # @sreal_compare i32.gt_u $push6=, $pop13, $pop12 br_if $pop6, 0 # 0: down to label0 # BB#3: # %if.end10 - i32.lt_u $push7=, $0, $1 i32.const $push9=, -1 i32.const $push8=, 0 - i32.select $2=, $pop7, $pop9, $pop8 + i32.lt_u $push7=, $0, $1 + i32.select $2=, $pop9, $pop8, $pop7 .LBB0_4: # %return end_block # label0: return $2 diff --git a/test/torture-s/20120919-1.c.s b/test/torture-s/20120919-1.c.s index b6ae0dca2..5f231bf6e 100644 --- a/test/torture-s/20120919-1.c.s +++ b/test/torture-s/20120919-1.c.s @@ -72,9 +72,9 @@ main: # @main # BB#4: # %if.then3 # in Loop: Header=BB1_2 Depth=1 i32.const $push21=, 0 - i32.gt_s $push7=, $2, $pop21 i32.const $push20=, 0 - i32.select $push8=, $pop7, $2, $pop20 + i32.gt_s $push7=, $2, $pop20 + i32.select $push8=, $2, $pop21, $pop7 i32.add $5=, $pop8, $5 .LBB1_5: # %if.end8 # in Loop: Header=BB1_2 Depth=1 diff --git a/test/torture-s/20121108-1.c.s b/test/torture-s/20121108-1.c.s index fdf00439f..e2e2b2f1c 100644 --- a/test/torture-s/20121108-1.c.s +++ b/test/torture-s/20121108-1.c.s @@ -73,10 +73,10 @@ string_to_ip: # @string_to_ip block i32.load $push4=, 12($9) tee_local $push28=, $1=, $pop4 - i32.load8_u $push5=, 0($pop28) i32.const $push27=, 1 - i32.add $push6=, $1, $pop27 - i32.select $push0=, $pop5, $pop6, $1 + i32.add $push6=, $pop28, $pop27 + i32.load8_u $push5=, 0($1) + i32.select $push0=, $pop6, $1, $pop5 tee_local $push26=, $1=, $pop0 i32.const $push42=, 0 i32.eq $push43=, $pop26, $pop42 @@ -90,10 +90,10 @@ string_to_ip: # @string_to_ip i32.or $0=, $pop10, $0 i32.load $push11=, 12($9) tee_local $push32=, $1=, $pop11 - i32.load8_u $push12=, 0($pop32) i32.const $push31=, 1 - i32.add $push13=, $1, $pop31 - i32.select $push1=, $pop12, $pop13, $1 + i32.add $push13=, $pop32, $pop31 + i32.load8_u $push12=, 0($1) + i32.select $push1=, $pop13, $1, $pop12 tee_local $push30=, $1=, $pop1 i32.const $push44=, 0 i32.eq $push45=, $pop30, $pop44 @@ -109,10 +109,10 @@ string_to_ip: # @string_to_ip i32.or $0=, $pop16, $pop15 i32.load $push17=, 12($9) tee_local $push36=, $1=, $pop17 - i32.load8_u $push18=, 0($pop36) i32.const $push19=, 1 - i32.add $push20=, $1, $pop19 - i32.select $push2=, $pop18, $pop20, $1 + i32.add $push20=, $pop36, $pop19 + i32.load8_u $push18=, 0($1) + i32.select $push2=, $pop20, $1, $pop18 tee_local $push35=, $1=, $pop2 i32.const $push46=, 0 i32.eq $push47=, $pop35, $pop46 diff --git a/test/torture-s/20140212-1.c.s b/test/torture-s/20140212-1.c.s index 8ee3bfccd..f53207a7c 100644 --- a/test/torture-s/20140212-1.c.s +++ b/test/torture-s/20140212-1.c.s @@ -15,14 +15,14 @@ fn1: # @fn1 tee_local $push15=, $5=, $pop4 i32.load $1=, d($pop15) i32.load $2=, f($5) + i32.const $push9=, 54 i32.load $push5=, a($5) - i32.ne $push6=, $pop5, $5 + i32.ne $push6=, $5, $pop5 i32.load $push7=, b($5) - i32.ne $push8=, $pop7, $5 + i32.ne $push8=, $5, $pop7 i32.and $push0=, $pop6, $pop8 tee_local $push14=, $4=, $pop0 - i32.const $push9=, 54 - i32.select $push1=, $pop14, $pop9, $5 + i32.select $push1=, $pop9, $5, $pop14 tee_local $push13=, $3=, $pop1 i32.const $push10=, 147 i32.mul $0=, $pop13, $pop10 @@ -80,14 +80,14 @@ main: # @main tee_local $push16=, $5=, $pop3 i32.load $1=, d($pop16) i32.load $2=, f($5) + i32.const $push8=, 54 i32.load $push4=, a($5) - i32.ne $push5=, $pop4, $5 + i32.ne $push5=, $5, $pop4 i32.load $push6=, b($5) - i32.ne $push7=, $pop6, $5 + i32.ne $push7=, $5, $pop6 i32.and $push0=, $pop5, $pop7 tee_local $push15=, $4=, $pop0 - i32.const $push8=, 54 - i32.select $0=, $pop15, $pop8, $5 + i32.select $0=, $pop8, $5, $pop15 copy_local $3=, $5 .LBB1_1: # %for.cond.i # =>This Inner Loop Header: Depth=1 diff --git a/test/torture-s/920501-2.c.s b/test/torture-s/920501-2.c.s index 0e78dd87a..2ecf64744 100644 --- a/test/torture-s/920501-2.c.s +++ b/test/torture-s/920501-2.c.s @@ -309,10 +309,10 @@ facts: # @facts end_loop # label27: end_block # label11: i64.add $7=, $9, $15 - i64.gt_u $push23=, $8, $7 i64.sub $push24=, $8, $7 i64.sub $push25=, $7, $8 - i64.select $push26=, $pop23, $pop24, $pop25 + i64.gt_u $push23=, $8, $7 + i64.select $push26=, $pop24, $pop25, $pop23 i64.const $push65=, 4294967295 i64.and $push28=, $pop26, $pop65 i64.const $push64=, 4294967295 diff --git a/test/torture-s/921204-1.c.s b/test/torture-s/921204-1.c.s index bf950f8aa..95dfbcae4 100644 --- a/test/torture-s/921204-1.c.s +++ b/test/torture-s/921204-1.c.s @@ -9,13 +9,13 @@ f: # @f # BB#0: # %entry i32.load $push0=, 0($1) tee_local $push8=, $1=, $pop0 - i32.const $push1=, 1 - i32.and $push2=, $pop8, $pop1 i32.const $push3=, 1310720 - i32.or $push4=, $1, $pop3 + i32.or $push4=, $pop8, $pop3 i32.const $push5=, -1310721 i32.and $push6=, $1, $pop5 - i32.select $push7=, $pop2, $pop4, $pop6 + i32.const $push1=, 1 + i32.and $push2=, $1, $pop1 + i32.select $push7=, $pop4, $pop6, $pop2 i32.store $discard=, 0($0), $pop7 return .endfunc diff --git a/test/torture-s/930725-1.c.s b/test/torture-s/930725-1.c.s index e7d519767..4e6e119ef 100644 --- a/test/torture-s/930725-1.c.s +++ b/test/torture-s/930725-1.c.s @@ -20,11 +20,11 @@ g: # @g f: # @f .result i32 # BB#0: # %entry - i32.const $push0=, 0 - i32.load $push1=, v($pop0) i32.const $push3=, .L.str.1 i32.const $push2=, .L.str - i32.select $push4=, $pop1, $pop3, $pop2 + i32.const $push0=, 0 + i32.load $push1=, v($pop0) + i32.select $push4=, $pop3, $pop2, $pop1 return $pop4 .endfunc .Lfunc_end1: diff --git a/test/torture-s/931012-1.c.s b/test/torture-s/931012-1.c.s index af060272c..8dc223076 100644 --- a/test/torture-s/931012-1.c.s +++ b/test/torture-s/931012-1.c.s @@ -8,11 +8,11 @@ f: # @f .param i32, i32 .result i32 # BB#0: # %entry + i32.const $push2=, 0 + i32.select $push3=, $pop2, $0, $1 i32.const $push0=, 1 i32.gt_u $push1=, $0, $pop0 - i32.const $push2=, 0 - i32.select $push3=, $1, $pop2, $0 - i32.select $push4=, $pop1, $pop3, $0 + i32.select $push4=, $pop3, $0, $pop1 return $pop4 .endfunc .Lfunc_end0: diff --git a/test/torture-s/931031-1.c.s b/test/torture-s/931031-1.c.s index 7953f36ae..ddf47eb92 100644 --- a/test/torture-s/931031-1.c.s +++ b/test/torture-s/931031-1.c.s @@ -8,14 +8,14 @@ f: # @f .param i32 .result i32 # BB#0: # %entry + i32.const $push3=, 1 i32.load $push0=, 4($0) tee_local $push7=, $0=, $pop0 - i32.const $push1=, 0 - i32.lt_s $push2=, $pop7, $pop1 - i32.const $push3=, 1 i32.const $push6=, 1 - i32.add $push4=, $0, $pop6 - i32.select $push5=, $pop2, $pop3, $pop4 + i32.add $push4=, $pop7, $pop6 + i32.const $push1=, 0 + i32.lt_s $push2=, $0, $pop1 + i32.select $push5=, $pop3, $pop4, $pop2 return $pop5 .endfunc .Lfunc_end0: diff --git a/test/torture-s/941015-1.c.s b/test/torture-s/941015-1.c.s index a65779fad..c60e17a50 100644 --- a/test/torture-s/941015-1.c.s +++ b/test/torture-s/941015-1.c.s @@ -8,11 +8,11 @@ foo1: # @foo1 .param i64 .result i32 # BB#0: # %entry - i64.const $push0=, -4611686016279904256 - i64.lt_s $push1=, $0, $pop0 i32.const $push3=, 1 i32.const $push2=, 2 - i32.select $push4=, $pop1, $pop3, $pop2 + i64.const $push0=, -4611686016279904256 + i64.lt_s $push1=, $0, $pop0 + i32.select $push4=, $pop3, $pop2, $pop1 return $pop4 .endfunc .Lfunc_end0: @@ -26,11 +26,11 @@ foo2: # @foo2 .param i64 .result i32 # BB#0: # %entry - i64.const $push0=, -4611686016279904256 - i64.lt_u $push1=, $0, $pop0 i32.const $push3=, 1 i32.const $push2=, 2 - i32.select $push4=, $pop1, $pop3, $pop2 + i64.const $push0=, -4611686016279904256 + i64.lt_u $push1=, $0, $pop0 + i32.select $push4=, $pop3, $pop2, $pop1 return $pop4 .endfunc .Lfunc_end1: diff --git a/test/torture-s/941021-1.c.s b/test/torture-s/941021-1.c.s index 4abc94a80..bc00094c1 100644 --- a/test/torture-s/941021-1.c.s +++ b/test/torture-s/941021-1.c.s @@ -9,7 +9,7 @@ f: # @f .result i32 # BB#0: # %entry i32.const $push0=, glob_dbl - i32.select $push1=, $0, $0, $pop0 + i32.select $push1=, $0, $pop0, $0 f64.store $discard=, 0($pop1), $1 return $0 .endfunc diff --git a/test/torture-s/941025-1.c.s b/test/torture-s/941025-1.c.s index c7c35e84f..de6c8026b 100644 --- a/test/torture-s/941025-1.c.s +++ b/test/torture-s/941025-1.c.s @@ -9,10 +9,10 @@ f: # @f .result i32 # BB#0: # %entry i32.const $push0=, 1 - i32.gt_s $push1=, $0, $pop0 + i32.and $push2=, $1, $pop0 i32.const $push4=, 1 - i32.and $push2=, $1, $pop4 - i32.select $push3=, $pop1, $1, $pop2 + i32.gt_s $push1=, $0, $pop4 + i32.select $push3=, $1, $pop2, $pop1 return $pop3 .endfunc .Lfunc_end0: diff --git a/test/torture-s/950512-1.c.s b/test/torture-s/950512-1.c.s index 157db4036..fe6bce917 100644 --- a/test/torture-s/950512-1.c.s +++ b/test/torture-s/950512-1.c.s @@ -10,7 +10,7 @@ f1: # @f1 # BB#0: # %entry i32.const $push1=, 2147483647 i32.const $push0=, 2147483646 - i32.select $push2=, $0, $pop1, $pop0 + i32.select $push2=, $pop1, $pop0, $0 return $pop2 .endfunc .Lfunc_end0: @@ -26,7 +26,7 @@ f2: # @f2 # BB#0: # %entry i64.const $push1=, 9223372036854775807 i64.const $push0=, 9223372036854775806 - i64.select $push2=, $0, $pop1, $pop0 + i64.select $push2=, $pop1, $pop0, $0 return $pop2 .endfunc .Lfunc_end1: diff --git a/test/torture-s/950607-2.c.s b/test/torture-s/950607-2.c.s index 7e5ffdc06..ceaed85d3 100644 --- a/test/torture-s/950607-2.c.s +++ b/test/torture-s/950607-2.c.s @@ -9,6 +9,9 @@ f: # @f .result i32 .local i64, i32 # BB#0: # %entry + i32.const $push23=, 0 + i32.const $push21=, 1 + i32.const $push20=, 2 i32.load $push4=, 4($2) i32.load $push5=, 4($0) tee_local $push28=, $4=, $pop5 @@ -30,14 +33,11 @@ f: # @f i64.sub $push16=, $pop8, $pop15 tee_local $push26=, $3=, $pop16 i64.const $push17=, 0 - i64.gt_s $push18=, $pop26, $pop17 - i32.const $push23=, 0 + i64.lt_s $push19=, $pop26, $pop17 + i32.select $push22=, $pop21, $pop20, $pop19 i64.const $push25=, 0 - i64.lt_s $push19=, $3, $pop25 - i32.const $push21=, 1 - i32.const $push20=, 2 - i32.select $push22=, $pop19, $pop21, $pop20 - i32.select $push24=, $pop18, $pop23, $pop22 + i64.gt_s $push18=, $3, $pop25 + i32.select $push24=, $pop23, $pop22, $pop18 return $pop24 .endfunc .Lfunc_end0: diff --git a/test/torture-s/960209-1.c.s b/test/torture-s/960209-1.c.s index 72a7f9cbf..7ad832cc5 100644 --- a/test/torture-s/960209-1.c.s +++ b/test/torture-s/960209-1.c.s @@ -10,7 +10,7 @@ f: # @f # BB#0: # %entry i32.const $push1=, -1 i32.const $push7=, 0 - i32.select $1=, $1, $pop1, $pop7 + i32.select $1=, $pop1, $pop7, $1 block i32.const $push6=, 0 i32.load $push0=, yabba($pop6) diff --git a/test/torture-s/960301-1.c.s b/test/torture-s/960301-1.c.s index c3ddc3497..0d81ffc7f 100644 --- a/test/torture-s/960301-1.c.s +++ b/test/torture-s/960301-1.c.s @@ -25,7 +25,7 @@ bar: # @bar i32.store16 $discard=, foo($pop12):p2align=2, $pop7 i32.const $push9=, 1 i32.const $push8=, 2 - i32.select $push10=, $0, $pop9, $pop8 + i32.select $push10=, $pop9, $pop8, $0 return $pop10 .endfunc .Lfunc_end0: diff --git a/test/torture-s/960302-1.c.s b/test/torture-s/960302-1.c.s index c38184f75..8414bc2c7 100644 --- a/test/torture-s/960302-1.c.s +++ b/test/torture-s/960302-1.c.s @@ -10,20 +10,21 @@ foo: # @foo # BB#0: # %entry i32.const $push0=, 0 i32.load $0=, a($pop0) + i32.const $push7=, 1 + i32.const $push9=, -1 i32.const $push1=, 31 i32.shr_u $push2=, $0, $pop1 i32.add $push3=, $0, $pop2 i32.const $push4=, -2 i32.and $push5=, $pop3, $pop4 - i32.sub $0=, $0, $pop5 - i32.const $push6=, 1 - i32.eq $push7=, $0, $pop6 - i32.const $push12=, 1 - i32.const $push8=, -1 - i32.select $push9=, $pop7, $pop12, $pop8 - i32.const $push11=, 0 - i32.select $push10=, $0, $pop9, $pop11 - return $pop10 + i32.sub $push6=, $0, $pop5 + tee_local $push14=, $0=, $pop6 + i32.const $push13=, 1 + i32.eq $push8=, $pop14, $pop13 + i32.select $push10=, $pop7, $pop9, $pop8 + i32.const $push12=, 0 + i32.select $push11=, $pop10, $pop12, $0 + return $pop11 .endfunc .Lfunc_end0: .size foo, .Lfunc_end0-foo diff --git a/test/torture-s/960416-1.c.s b/test/torture-s/960416-1.c.s index 6b484514d..e76f17045 100644 --- a/test/torture-s/960416-1.c.s +++ b/test/torture-s/960416-1.c.s @@ -33,23 +33,23 @@ f_le: # @f_le i64.const $push43=, 32 i64.shr_u $push23=, $3, $pop43 i64.add $push30=, $pop29, $pop23 + i32.const $push9=, 0 i32.wrap/i64 $push4=, $8 tee_local $push42=, $2=, $pop4 i32.wrap/i64 $push7=, $5 i32.sub $push8=, $pop42, $pop7 tee_local $push41=, $0=, $pop8 - i32.gt_u $push11=, $pop41, $2 + i32.sub $push10=, $pop9, $pop41 + i32.gt_u $push11=, $0, $2 tee_local $push40=, $2=, $pop11 - i32.const $push9=, 0 - i32.sub $push10=, $pop9, $0 - i32.select $push12=, $pop40, $pop10, $0 + i32.select $push12=, $pop10, $0, $pop40 i64.extend_u/i32 $push25=, $pop12 i32.sub $push2=, $4, $1 i64.extend_u/i32 $push24=, $pop2 i64.mul $push26=, $pop25, $pop24 i64.const $push14=, -1 i64.const $push13=, 0 - i64.select $push15=, $2, $pop14, $pop13 + i64.select $push15=, $pop14, $pop13, $2 i64.xor $push27=, $pop26, $pop15 tee_local $push39=, $8=, $pop27 i64.const $push38=, 32 @@ -99,13 +99,13 @@ f_be: # @f_be i64.const $push51=, 4294967295 i64.and $push27=, $2, $pop51 i64.add $push31=, $pop30, $pop27 + i32.const $push7=, 0 i32.sub $push6=, $7, $1 tee_local $push50=, $1=, $pop6 - i32.gt_u $push9=, $pop50, $7 + i32.sub $push8=, $pop7, $pop50 + i32.gt_u $push9=, $1, $7 tee_local $push49=, $7=, $pop9 - i32.const $push7=, 0 - i32.sub $push8=, $pop7, $1 - i32.select $push10=, $pop49, $pop8, $1 + i32.select $push10=, $pop8, $1, $pop49 i64.extend_u/i32 $push23=, $pop10 i64.sub $push3=, $6, $5 i64.const $push48=, 4294967295 @@ -113,7 +113,7 @@ f_be: # @f_be i64.mul $push24=, $pop23, $pop22 i64.const $push12=, -1 i64.const $push11=, 0 - i64.select $push13=, $7, $pop12, $pop11 + i64.select $push13=, $pop12, $pop11, $7 i64.xor $push25=, $pop24, $pop13 tee_local $push47=, $6=, $pop25 i64.const $push46=, 4294967295 diff --git a/test/torture-s/960513-1.c.s b/test/torture-s/960513-1.c.s index 9b5e95291..9f686f26a 100644 --- a/test/torture-s/960513-1.c.s +++ b/test/torture-s/960513-1.c.s @@ -30,18 +30,18 @@ f: # @f i32.const $11=, 160 i32.add $11=, $31, $11 call __multf3@FUNCTION, $11, $1, $2, $pop65, $pop6 + i64.load $push9=, 160($31) i32.const $push4=, 1 i32.eq $push5=, $3, $pop4 tee_local $push64=, $3=, $pop5 - i64.load $push9=, 160($31) - i64.select $push11=, $pop64, $pop9, $5 + i64.select $push11=, $pop9, $5, $pop64 tee_local $push63=, $5=, $pop11 i32.const $push62=, 8 i32.const $12=, 160 i32.add $12=, $31, $12 i32.add $push7=, $12, $pop62 i64.load $push8=, 0($pop7) - i64.select $push10=, $3, $pop8, $4 + i64.select $push10=, $pop8, $4, $3 tee_local $push61=, $4=, $pop10 i32.const $13=, 144 i32.add $13=, $31, $13 diff --git a/test/torture-s/961125-1.c.s b/test/torture-s/961125-1.c.s index 507fc2023..c535e0453 100644 --- a/test/torture-s/961125-1.c.s +++ b/test/torture-s/961125-1.c.s @@ -14,54 +14,53 @@ main: # @main # =>This Loop Header: Depth=1 # Child Loop BB0_3 Depth 2 loop # label0: - i32.const $push19=, 0 - i32.eq $push20=, $1, $pop19 - br_if $pop20, 1 # 1: down to label1 + i32.const $push17=, 0 + i32.eq $push18=, $1, $pop17 + br_if $pop18, 1 # 1: down to label1 # BB#2: # %while.cond2.preheader.i # in Loop: Header=BB0_1 Depth=1 block - i32.const $push12=, .L.str+3 - i32.ge_u $push0=, $2, $pop12 + i32.const $push11=, .L.str+3 + i32.ge_u $push0=, $2, $pop11 br_if $pop0, 0 # 0: down to label2 .LBB0_3: # %land.rhs4.i # Parent Loop BB0_1 Depth=1 # => This Inner Loop Header: Depth=2 loop # label3: i32.load8_u $0=, 0($2) - i32.const $push14=, 1 - i32.add $2=, $2, $pop14 - i32.const $push13=, 58 - i32.eq $push1=, $0, $pop13 + i32.const $push13=, 1 + i32.add $2=, $2, $pop13 + i32.const $push12=, 58 + i32.eq $push1=, $0, $pop12 br_if $pop1, 1 # 1: down to label4 # BB#4: # %land.rhs4.i # in Loop: Header=BB0_3 Depth=2 - i32.const $push15=, .L.str+3 - i32.lt_u $push2=, $2, $pop15 + i32.const $push14=, .L.str+3 + i32.lt_u $push2=, $2, $pop14 br_if $pop2, 0 # 0: up to label3 .LBB0_5: # %while.end.thread.i # in Loop: Header=BB0_1 Depth=1 end_loop # label4: end_block # label2: - i32.const $push17=, -1 - i32.add $1=, $1, $pop17 - i32.const $push16=, .L.str+3 - i32.lt_u $push3=, $2, $pop16 + i32.const $push16=, -1 + i32.add $1=, $1, $pop16 + i32.const $push15=, .L.str+3 + i32.lt_u $push3=, $2, $pop15 br_if $pop3, 0 # 0: up to label0 .LBB0_6: # %begfield.exit end_loop # label1: - block i32.const $push4=, 1 - i32.add $push5=, $2, $pop4 - tee_local $push18=, $0=, $pop5 - i32.const $push6=, .L.str+3 - i32.gt_u $push7=, $pop18, $pop6 - i32.select $push8=, $pop7, $2, $0 - i32.const $push9=, .L.str+2 - i32.ne $push10=, $pop8, $pop9 - br_if $pop10, 0 # 0: down to label5 + i32.add $0=, $2, $pop4 + block + i32.const $push5=, .L.str+3 + i32.gt_u $push6=, $0, $pop5 + i32.select $push7=, $2, $0, $pop6 + i32.const $push8=, .L.str+2 + i32.ne $push9=, $pop7, $pop8 + br_if $pop9, 0 # 0: down to label5 # BB#7: # %if.end - i32.const $push11=, 0 - call exit@FUNCTION, $pop11 + i32.const $push10=, 0 + call exit@FUNCTION, $pop10 unreachable .LBB0_8: # %if.then end_block # label5: diff --git a/test/torture-s/980604-1.c.s b/test/torture-s/980604-1.c.s index c1c7544b9..9956e4fc1 100644 --- a/test/torture-s/980604-1.c.s +++ b/test/torture-s/980604-1.c.s @@ -8,14 +8,14 @@ main: # @main .result i32 # BB#0: # %entry block + i32.const $push0=, c + i32.const $push1=, d i32.const $push8=, 0 i32.load $push2=, a($pop8) i32.const $push7=, 0 i32.load $push3=, b($pop7) i32.lt_s $push4=, $pop2, $pop3 - i32.const $push0=, c - i32.const $push1=, d - i32.select $push5=, $pop4, $pop0, $pop1 + i32.select $push5=, $pop0, $pop1, $pop4 i32.load $push6=, 0($pop5) br_if $pop6, 0 # 0: down to label0 # BB#1: # %if.end diff --git a/test/torture-s/990106-2.c.s b/test/torture-s/990106-2.c.s index dd555d5df..12b877a04 100644 --- a/test/torture-s/990106-2.c.s +++ b/test/torture-s/990106-2.c.s @@ -13,9 +13,9 @@ calc_mp: # @calc_mp i32.rem_u $push1=, $pop0, $0 i32.const $push2=, 1 i32.add $1=, $pop1, $pop2 - i32.gt_u $push3=, $1, $0 i32.const $push4=, 0 - i32.select $push5=, $pop3, $0, $pop4 + i32.gt_u $push3=, $1, $0 + i32.select $push5=, $0, $pop4, $pop3 i32.sub $push6=, $1, $pop5 return $pop6 .endfunc diff --git a/test/torture-s/990404-1.c.s b/test/torture-s/990404-1.c.s index b63a40460..a6ed0cee0 100644 --- a/test/torture-s/990404-1.c.s +++ b/test/torture-s/990404-1.c.s @@ -8,125 +8,106 @@ main: # @main .result i32 .local i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 # BB#0: # %entry - i32.const $0=, -1 + i32.const $4=, -1 # implicit-def: %vreg64 .LBB0_1: # %for.cond # =>This Inner Loop Header: Depth=1 block loop # label1: - i32.const $push82=, 0 - i32.load $push36=, x+36($pop82) - tee_local $push81=, $13=, $pop36 - i32.const $push80=, 0 - i32.load $push32=, x+32($pop80):p2align=4 - tee_local $push79=, $12=, $pop32 - i32.const $push78=, 0 - i32.load $push28=, x+28($pop78) - tee_local $push77=, $11=, $pop28 - i32.const $push76=, 0 - i32.load $push24=, x+24($pop76):p2align=3 - tee_local $push75=, $10=, $pop24 - i32.const $push74=, 0 - i32.load $push20=, x+20($pop74) - tee_local $push73=, $9=, $pop20 - i32.const $push72=, 0 - i32.load $push16=, x+16($pop72):p2align=4 - tee_local $push71=, $8=, $pop16 - i32.const $push70=, 0 - i32.load $push12=, x+12($pop70) - tee_local $push69=, $7=, $pop12 - i32.const $push68=, 0 - i32.load $push8=, x+8($pop68):p2align=3 - tee_local $push67=, $6=, $pop8 - i32.const $push66=, 0 - i32.load $push4=, x+4($pop66) - tee_local $push65=, $5=, $pop4 - i32.const $push64=, 0 - i32.load $push0=, x($pop64):p2align=4 - tee_local $push63=, $4=, $pop0 - i32.const $push62=, 0 - i32.gt_s $push1=, $pop63, $pop62 - tee_local $push61=, $3=, $pop1 - i32.const $push60=, 0 - i32.select $push3=, $pop61, $4, $pop60 - tee_local $push59=, $4=, $pop3 - i32.gt_s $push5=, $pop65, $pop59 - tee_local $push58=, $2=, $pop5 - i32.select $push7=, $pop58, $5, $4 - tee_local $push57=, $5=, $pop7 - i32.gt_s $push9=, $pop67, $pop57 - tee_local $push56=, $4=, $pop9 - i32.select $push11=, $pop56, $6, $5 - tee_local $push55=, $6=, $pop11 - i32.gt_s $push13=, $pop69, $pop55 - tee_local $push54=, $5=, $pop13 - i32.select $push15=, $pop54, $7, $6 - tee_local $push53=, $7=, $pop15 - i32.gt_s $push17=, $pop71, $pop53 - tee_local $push52=, $6=, $pop17 - i32.select $push19=, $pop52, $8, $7 - tee_local $push51=, $8=, $pop19 - i32.gt_s $push21=, $pop73, $pop51 - tee_local $push50=, $7=, $pop21 - i32.select $push23=, $pop50, $9, $8 - tee_local $push49=, $9=, $pop23 - i32.gt_s $push25=, $pop75, $pop49 - tee_local $push48=, $8=, $pop25 - i32.select $push27=, $pop48, $10, $9 - tee_local $push47=, $10=, $pop27 - i32.gt_s $push29=, $pop77, $pop47 - tee_local $push46=, $9=, $pop29 - i32.select $push31=, $pop46, $11, $10 - tee_local $push45=, $11=, $pop31 - i32.gt_s $push33=, $pop79, $pop45 - tee_local $push44=, $10=, $pop33 - i32.select $push35=, $pop44, $12, $11 - tee_local $push43=, $12=, $pop35 - i32.gt_s $push37=, $pop81, $pop43 - tee_local $push42=, $11=, $pop37 - i32.select $push38=, $pop42, $13, $12 - i32.const $push97=, 0 - i32.eq $push98=, $pop38, $pop97 - br_if $pop98, 2 # 2: down to label0 + i32.const $push44=, 0 + i32.load $0=, x($pop44):p2align=4 + i32.const $push43=, 0 + i32.load $1=, x+4($pop43) + i32.const $push42=, 0 + i32.const $push41=, 0 + i32.gt_s $push0=, $0, $pop41 + tee_local $push40=, $13=, $pop0 + i32.select $0=, $0, $pop42, $pop40 + i32.const $push39=, 0 + i32.load $2=, x+8($pop39):p2align=3 + i32.gt_s $push2=, $1, $0 + tee_local $push38=, $12=, $pop2 + i32.select $0=, $1, $0, $pop38 + i32.const $push37=, 0 + i32.load $1=, x+12($pop37) + i32.gt_s $push4=, $2, $0 + tee_local $push36=, $11=, $pop4 + i32.select $0=, $2, $0, $pop36 + i32.const $push35=, 0 + i32.load $2=, x+16($pop35):p2align=4 + i32.gt_s $push6=, $1, $0 + tee_local $push34=, $10=, $pop6 + i32.select $0=, $1, $0, $pop34 + i32.const $push33=, 0 + i32.load $1=, x+20($pop33) + i32.gt_s $push8=, $2, $0 + tee_local $push32=, $9=, $pop8 + i32.select $0=, $2, $0, $pop32 + i32.const $push31=, 0 + i32.load $2=, x+24($pop31):p2align=3 + i32.gt_s $push10=, $1, $0 + tee_local $push30=, $8=, $pop10 + i32.select $0=, $1, $0, $pop30 + i32.const $push29=, 0 + i32.load $1=, x+28($pop29) + i32.gt_s $push12=, $2, $0 + tee_local $push28=, $7=, $pop12 + i32.select $0=, $2, $0, $pop28 + i32.const $push27=, 0 + i32.load $2=, x+32($pop27):p2align=4 + i32.const $push26=, 0 + i32.load $3=, x+36($pop26) + i32.gt_s $push14=, $1, $0 + tee_local $push25=, $6=, $pop14 + i32.select $0=, $1, $0, $pop25 + i32.gt_s $push16=, $2, $0 + tee_local $push24=, $1=, $pop16 + i32.select $0=, $2, $0, $pop24 + i32.gt_s $push18=, $3, $0 + tee_local $push23=, $2=, $pop18 + i32.select $push19=, $3, $0, $pop23 + i32.const $push59=, 0 + i32.eq $push60=, $pop19, $pop59 + br_if $pop60, 2 # 2: down to label0 # BB#2: # %if.end7 # in Loop: Header=BB0_1 Depth=1 - i32.const $push96=, 9 - i32.const $push95=, 8 - i32.const $push94=, 7 - i32.const $push93=, 6 - i32.const $push92=, 5 - i32.const $push91=, 4 - i32.const $push90=, 3 - i32.const $push89=, 2 - i32.const $push88=, 1 - i32.const $push87=, 0 - i32.select $push2=, $3, $pop87, $1 - i32.select $push6=, $2, $pop88, $pop2 - i32.select $push10=, $4, $pop89, $pop6 - i32.select $push14=, $5, $pop90, $pop10 - i32.select $push18=, $6, $pop91, $pop14 - i32.select $push22=, $7, $pop92, $pop18 - i32.select $push26=, $8, $pop93, $pop22 - i32.select $push30=, $9, $pop94, $pop26 - i32.select $push34=, $10, $pop95, $pop30 - i32.select $1=, $11, $pop96, $pop34 - i32.const $push86=, 2 - i32.shl $push39=, $1, $pop86 - i32.const $push85=, 0 - i32.store $discard=, x($pop39), $pop85 - i32.const $push84=, 1 - i32.add $0=, $0, $pop84 - i32.const $push83=, 10 - i32.lt_s $push40=, $0, $pop83 - br_if $pop40, 0 # 0: up to label1 + i32.const $push58=, 9 + i32.const $push57=, 8 + i32.const $push56=, 7 + i32.const $push55=, 6 + i32.const $push54=, 5 + i32.const $push53=, 4 + i32.const $push52=, 3 + i32.const $push51=, 2 + i32.const $push50=, 1 + i32.const $push49=, 0 + i32.select $push1=, $pop49, $5, $13 + i32.select $push3=, $pop50, $pop1, $12 + i32.select $push5=, $pop51, $pop3, $11 + i32.select $push7=, $pop52, $pop5, $10 + i32.select $push9=, $pop53, $pop7, $9 + i32.select $push11=, $pop54, $pop9, $8 + i32.select $push13=, $pop55, $pop11, $7 + i32.select $push15=, $pop56, $pop13, $6 + i32.select $push17=, $pop57, $pop15, $1 + i32.select $5=, $pop58, $pop17, $2 + i32.const $push48=, 2 + i32.shl $push20=, $5, $pop48 + i32.const $push47=, 0 + i32.store $discard=, x($pop20), $pop47 + i32.const $push46=, 1 + i32.add $4=, $4, $pop46 + i32.const $push45=, 10 + i32.lt_s $push21=, $4, $pop45 + br_if $pop21, 0 # 0: up to label1 # BB#3: # %if.then11 end_loop # label2: call abort@FUNCTION unreachable .LBB0_4: # %for.end15 end_block # label0: - i32.const $push41=, 0 - call exit@FUNCTION, $pop41 + i32.const $push22=, 0 + call exit@FUNCTION, $pop22 unreachable .endfunc .Lfunc_end0: diff --git a/test/torture-s/990628-1.c.s b/test/torture-s/990628-1.c.s index 13013862e..1afd3ed04 100644 --- a/test/torture-s/990628-1.c.s +++ b/test/torture-s/990628-1.c.s @@ -32,11 +32,11 @@ fetch: # @fetch i32.add $push6=, $pop13, $pop5 i32.store $discard=, fetch.fetch_count($pop3), $pop6 i32.const $push12=, 0 - i32.const $push11=, 0 - i32.gt_s $push7=, $0, $pop11 i32.const $push8=, 100 + i32.const $push11=, 0 i32.const $push10=, 0 - i32.select $push9=, $pop7, $pop8, $pop10 + i32.gt_s $push7=, $0, $pop10 + i32.select $push9=, $pop8, $pop11, $pop7 i32.store $discard=, sqlca($pop12), $pop9 return .endfunc @@ -69,12 +69,12 @@ load_data: # @load_data i32.add $push7=, $pop20, $pop19 i32.store $discard=, fetch.fetch_count($pop22), $pop7 i32.const $push18=, 0 - i32.const $push17=, 0 - i32.gt_s $push8=, $3, $pop17 - tee_local $push16=, $0=, $pop8 i32.const $push9=, 100 - i32.const $push15=, 0 - i32.select $push10=, $pop16, $pop9, $pop15 + i32.const $push17=, 0 + i32.const $push16=, 0 + i32.gt_s $push8=, $3, $pop16 + tee_local $push15=, $0=, $pop8 + i32.select $push10=, $pop9, $pop17, $pop15 i32.store $discard=, sqlca($pop18), $pop10 block br_if $0, 0 # 0: down to label0 @@ -139,12 +139,12 @@ main: # @main i32.add $push5=, $pop23, $pop22 i32.store $discard=, fetch.fetch_count($pop25), $pop5 i32.const $push21=, 0 - i32.const $push20=, 0 - i32.gt_s $push6=, $4, $pop20 - tee_local $push19=, $3=, $pop6 i32.const $push7=, 100 - i32.const $push18=, 0 - i32.select $push8=, $pop19, $pop7, $pop18 + i32.const $push20=, 0 + i32.const $push19=, 0 + i32.gt_s $push6=, $4, $pop19 + tee_local $push18=, $3=, $pop6 + i32.select $push8=, $pop7, $pop20, $pop18 i32.store $discard=, sqlca($pop21), $pop8 block br_if $3, 0 # 0: down to label3 diff --git a/test/torture-s/990923-1.c.s b/test/torture-s/990923-1.c.s index 2093955c8..dde1b5562 100644 --- a/test/torture-s/990923-1.c.s +++ b/test/torture-s/990923-1.c.s @@ -8,14 +8,14 @@ foo: # @foo .param i32 .result i32 # BB#0: # %entry + i32.const $push4=, 65535 + i32.and $push5=, $0, $pop4 + i32.const $push6=, 1 i32.const $push0=, -65536 i32.and $push1=, $0, $pop0 i32.const $push2=, -1412628480 i32.eq $push3=, $pop1, $pop2 - i32.const $push4=, 65535 - i32.and $push5=, $0, $pop4 - i32.const $push6=, 1 - i32.select $push7=, $pop3, $pop5, $pop6 + i32.select $push7=, $pop5, $pop6, $pop3 return $pop7 .endfunc .Lfunc_end0: diff --git a/test/torture-s/991112-1.c.s b/test/torture-s/991112-1.c.s index 839f4e1a7..6edafa66d 100644 --- a/test/torture-s/991112-1.c.s +++ b/test/torture-s/991112-1.c.s @@ -22,10 +22,10 @@ rl_character_len: # @rl_character_len .param i32, i32 .result i32 # BB#0: # %entry - i32.call $push0=, isprint@FUNCTION, $0 i32.const $push2=, 1 i32.const $push1=, 2 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.call $push0=, isprint@FUNCTION, $0 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end1: diff --git a/test/torture-s/991227-1.c.s b/test/torture-s/991227-1.c.s index f60a2aa49..d88381219 100644 --- a/test/torture-s/991227-1.c.s +++ b/test/torture-s/991227-1.c.s @@ -10,7 +10,7 @@ doit: # @doit # BB#0: # %entry i32.const $push1=, .L.str i32.const $push0=, .L.str.1 - i32.select $push2=, $0, $pop1, $pop0 + i32.select $push2=, $pop1, $pop0, $0 i32.const $push3=, 1 i32.add $push4=, $pop2, $pop3 return $pop4 diff --git a/test/torture-s/arith-1.c.s b/test/torture-s/arith-1.c.s index 457871b67..861237fc8 100644 --- a/test/torture-s/arith-1.c.s +++ b/test/torture-s/arith-1.c.s @@ -9,11 +9,11 @@ sat_add: # @sat_add .result i32 # BB#0: # %entry i32.const $push2=, -1 - i32.eq $push3=, $0, $pop2 - i32.const $push5=, -1 i32.const $push0=, 1 i32.add $push1=, $0, $pop0 - i32.select $push4=, $pop3, $pop5, $pop1 + i32.const $push5=, -1 + i32.eq $push3=, $0, $pop5 + i32.select $push4=, $pop2, $pop1, $pop3 return $pop4 .endfunc .Lfunc_end0: diff --git a/test/torture-s/arith-rand-ll.c.s b/test/torture-s/arith-rand-ll.c.s index 9b5d53b65..704f6eea6 100644 --- a/test/torture-s/arith-rand-ll.c.s +++ b/test/torture-s/arith-rand-ll.c.s @@ -311,16 +311,16 @@ main: # @main i32.const $push142=, 16 i32.shr_s $3=, $pop143, $pop142 block - i32.const $push141=, -65536 - i32.gt_s $push56=, $10, $pop141 - i32.const $push140=, 0 - i32.sub $push57=, $pop140, $3 - i32.select $push58=, $pop56, $3, $pop57 - i32.const $push139=, -65536 - i32.gt_s $push59=, $11, $pop139 - i32.const $push138=, 0 - i32.sub $push60=, $pop138, $2 - i32.select $push61=, $pop59, $2, $pop60 + i32.const $push141=, 0 + i32.sub $push57=, $pop141, $3 + i32.const $push140=, -65536 + i32.gt_s $push56=, $10, $pop140 + i32.select $push58=, $3, $pop57, $pop56 + i32.const $push139=, 0 + i32.sub $push60=, $pop139, $2 + i32.const $push138=, -65536 + i32.gt_s $push59=, $11, $pop138 + i32.select $push61=, $2, $pop60, $pop59 i32.const $push137=, 65535 i32.and $push62=, $pop61, $pop137 i32.ge_s $push63=, $pop58, $pop62 @@ -363,16 +363,16 @@ main: # @main i32.const $push160=, 24 i32.shr_s $7=, $pop161, $pop160 block - i32.const $push159=, -16777216 - i32.gt_s $push76=, $12, $pop159 - i32.const $push158=, 0 - i32.sub $push77=, $pop158, $7 - i32.select $push78=, $pop76, $7, $pop77 - i32.const $push157=, -16777216 - i32.gt_s $push79=, $3, $pop157 - i32.const $push156=, 0 - i32.sub $push80=, $pop156, $4 - i32.select $push81=, $pop79, $4, $pop80 + i32.const $push159=, 0 + i32.sub $push77=, $pop159, $7 + i32.const $push158=, -16777216 + i32.gt_s $push76=, $12, $pop158 + i32.select $push78=, $7, $pop77, $pop76 + i32.const $push157=, 0 + i32.sub $push80=, $pop157, $4 + i32.const $push156=, -16777216 + i32.gt_s $push79=, $3, $pop156 + i32.select $push81=, $4, $pop80, $pop79 i32.const $push155=, 255 i32.and $push82=, $pop81, $pop155 i32.ge_s $push83=, $pop78, $pop82 diff --git a/test/torture-s/arith-rand.c.s b/test/torture-s/arith-rand.c.s index b64f03ade..4c28a0ef4 100644 --- a/test/torture-s/arith-rand.c.s +++ b/test/torture-s/arith-rand.c.s @@ -244,16 +244,16 @@ main: # @main i32.const $push101=, 16 i32.shr_s $3=, $pop102, $pop101 block - i32.const $push100=, -65536 - i32.gt_s $push33=, $6, $pop100 - i32.const $push99=, 0 - i32.sub $push34=, $pop99, $3 - i32.select $push35=, $pop33, $3, $pop34 - i32.const $push98=, -65536 - i32.gt_s $push36=, $7, $pop98 - i32.const $push97=, 0 - i32.sub $push37=, $pop97, $5 - i32.select $push38=, $pop36, $5, $pop37 + i32.const $push100=, 0 + i32.sub $push34=, $pop100, $3 + i32.const $push99=, -65536 + i32.gt_s $push33=, $6, $pop99 + i32.select $push35=, $3, $pop34, $pop33 + i32.const $push98=, 0 + i32.sub $push37=, $pop98, $5 + i32.const $push97=, -65536 + i32.gt_s $push36=, $7, $pop97 + i32.select $push38=, $5, $pop37, $pop36 i32.const $push96=, 65535 i32.and $push39=, $pop38, $pop96 i32.ge_s $push40=, $pop35, $pop39 @@ -296,16 +296,16 @@ main: # @main i32.const $push119=, 24 i32.shr_s $4=, $pop120, $pop119 block - i32.const $push118=, -16777216 - i32.gt_s $push53=, $8, $pop118 - i32.const $push117=, 0 - i32.sub $push54=, $pop117, $4 - i32.select $push55=, $pop53, $4, $pop54 - i32.const $push116=, -16777216 - i32.gt_s $push56=, $3, $pop116 - i32.const $push115=, 0 - i32.sub $push57=, $pop115, $5 - i32.select $push58=, $pop56, $5, $pop57 + i32.const $push118=, 0 + i32.sub $push54=, $pop118, $4 + i32.const $push117=, -16777216 + i32.gt_s $push53=, $8, $pop117 + i32.select $push55=, $4, $pop54, $pop53 + i32.const $push116=, 0 + i32.sub $push57=, $pop116, $5 + i32.const $push115=, -16777216 + i32.gt_s $push56=, $3, $pop115 + i32.select $push58=, $5, $pop57, $pop56 i32.const $push114=, 255 i32.and $push59=, $pop58, $pop114 i32.ge_s $push60=, $pop55, $pop59 diff --git a/test/torture-s/cmpdi-1.c.s b/test/torture-s/cmpdi-1.c.s index da593c815..751cac13e 100644 --- a/test/torture-s/cmpdi-1.c.s +++ b/test/torture-s/cmpdi-1.c.s @@ -8,10 +8,10 @@ feq: # @feq .param i64, i64 .result i32 # BB#0: # %entry - i64.eq $push0=, $0, $1 i32.const $push2=, 13 i32.const $push1=, 140 - i32.select $push3=, $pop0, $pop2, $pop1 + i64.eq $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end0: @@ -25,10 +25,10 @@ fne: # @fne .param i64, i64 .result i32 # BB#0: # %entry - i64.eq $push0=, $0, $1 i32.const $push2=, 140 i32.const $push1=, 13 - i32.select $push3=, $pop0, $pop2, $pop1 + i64.eq $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end1: @@ -42,10 +42,10 @@ flt: # @flt .param i64, i64 .result i32 # BB#0: # %entry - i64.lt_s $push0=, $0, $1 i32.const $push2=, 13 i32.const $push1=, 140 - i32.select $push3=, $pop0, $pop2, $pop1 + i64.lt_s $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end2: @@ -59,10 +59,10 @@ fge: # @fge .param i64, i64 .result i32 # BB#0: # %entry - i64.lt_s $push0=, $0, $1 i32.const $push2=, 140 i32.const $push1=, 13 - i32.select $push3=, $pop0, $pop2, $pop1 + i64.lt_s $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end3: @@ -76,10 +76,10 @@ fgt: # @fgt .param i64, i64 .result i32 # BB#0: # %entry - i64.gt_s $push0=, $0, $1 i32.const $push2=, 13 i32.const $push1=, 140 - i32.select $push3=, $pop0, $pop2, $pop1 + i64.gt_s $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end4: @@ -93,10 +93,10 @@ fle: # @fle .param i64, i64 .result i32 # BB#0: # %entry - i64.gt_s $push0=, $0, $1 i32.const $push2=, 140 i32.const $push1=, 13 - i32.select $push3=, $pop0, $pop2, $pop1 + i64.gt_s $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end5: @@ -110,10 +110,10 @@ fltu: # @fltu .param i64, i64 .result i32 # BB#0: # %entry - i64.lt_u $push0=, $0, $1 i32.const $push2=, 13 i32.const $push1=, 140 - i32.select $push3=, $pop0, $pop2, $pop1 + i64.lt_u $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end6: @@ -127,10 +127,10 @@ fgeu: # @fgeu .param i64, i64 .result i32 # BB#0: # %entry - i64.lt_u $push0=, $0, $1 i32.const $push2=, 140 i32.const $push1=, 13 - i32.select $push3=, $pop0, $pop2, $pop1 + i64.lt_u $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end7: @@ -144,10 +144,10 @@ fgtu: # @fgtu .param i64, i64 .result i32 # BB#0: # %entry - i64.gt_u $push0=, $0, $1 i32.const $push2=, 13 i32.const $push1=, 140 - i32.select $push3=, $pop0, $pop2, $pop1 + i64.gt_u $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end8: @@ -161,10 +161,10 @@ fleu: # @fleu .param i64, i64 .result i32 # BB#0: # %entry - i64.gt_u $push0=, $0, $1 i32.const $push2=, 140 i32.const $push1=, 13 - i32.select $push3=, $pop0, $pop2, $pop1 + i64.gt_u $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end9: @@ -203,13 +203,13 @@ main: # @main # Parent Loop BB10_1 Depth=1 # => This Inner Loop Header: Depth=2 loop # label12: + i32.const $push53=, 13 + i32.const $push52=, 140 i64.load $push0=, 0($2) - tee_local $push53=, $6=, $pop0 - i64.eq $push2=, $1, $pop53 - tee_local $push52=, $5=, $pop2 - i32.const $push51=, 13 - i32.const $push50=, 140 - i32.select $push3=, $pop52, $pop51, $pop50 + tee_local $push51=, $6=, $pop0 + i64.eq $push2=, $1, $pop51 + tee_local $push50=, $5=, $pop2 + i32.select $push3=, $pop53, $pop52, $pop50 i32.load $push4=, 0($4) i32.ne $push5=, $pop3, $pop4 br_if $pop5, 13 # 13: down to label0 @@ -217,7 +217,7 @@ main: # @main # in Loop: Header=BB10_2 Depth=2 i32.const $push56=, 140 i32.const $push55=, 13 - i32.select $push6=, $5, $pop56, $pop55 + i32.select $push6=, $pop56, $pop55, $5 i32.const $push54=, 4 i32.add $push7=, $4, $pop54 i32.load $push8=, 0($pop7) @@ -225,10 +225,10 @@ main: # @main br_if $pop9, 12 # 12: down to label1 # BB#4: # %if.end10 # in Loop: Header=BB10_2 Depth=2 + i32.const $push60=, 13 + i32.const $push59=, 140 i64.lt_s $push10=, $1, $6 - tee_local $push60=, $5=, $pop10 - i32.const $push59=, 13 - i32.const $push58=, 140 + tee_local $push58=, $5=, $pop10 i32.select $push11=, $pop60, $pop59, $pop58 i32.const $push57=, 8 i32.add $push12=, $4, $pop57 @@ -239,7 +239,7 @@ main: # @main # in Loop: Header=BB10_2 Depth=2 i32.const $push63=, 140 i32.const $push62=, 13 - i32.select $push15=, $5, $pop63, $pop62 + i32.select $push15=, $pop63, $pop62, $5 i32.const $push61=, 12 i32.add $push16=, $4, $pop61 i32.load $push17=, 0($pop16) @@ -247,10 +247,10 @@ main: # @main br_if $pop18, 10 # 10: down to label3 # BB#6: # %if.end20 # in Loop: Header=BB10_2 Depth=2 + i32.const $push67=, 13 + i32.const $push66=, 140 i64.gt_s $push19=, $1, $6 - tee_local $push67=, $5=, $pop19 - i32.const $push66=, 13 - i32.const $push65=, 140 + tee_local $push65=, $5=, $pop19 i32.select $push20=, $pop67, $pop66, $pop65 i32.const $push64=, 16 i32.add $push21=, $4, $pop64 @@ -261,7 +261,7 @@ main: # @main # in Loop: Header=BB10_2 Depth=2 i32.const $push70=, 140 i32.const $push69=, 13 - i32.select $push24=, $5, $pop70, $pop69 + i32.select $push24=, $pop70, $pop69, $5 i32.const $push68=, 20 i32.add $push25=, $4, $pop68 i32.load $push26=, 0($pop25) @@ -269,10 +269,10 @@ main: # @main br_if $pop27, 8 # 8: down to label5 # BB#8: # %if.end30 # in Loop: Header=BB10_2 Depth=2 + i32.const $push74=, 13 + i32.const $push73=, 140 i64.lt_u $push28=, $1, $6 - tee_local $push74=, $5=, $pop28 - i32.const $push73=, 13 - i32.const $push72=, 140 + tee_local $push72=, $5=, $pop28 i32.select $push29=, $pop74, $pop73, $pop72 i32.const $push71=, 24 i32.add $push30=, $4, $pop71 @@ -283,7 +283,7 @@ main: # @main # in Loop: Header=BB10_2 Depth=2 i32.const $push77=, 140 i32.const $push76=, 13 - i32.select $push33=, $5, $pop77, $pop76 + i32.select $push33=, $pop77, $pop76, $5 i32.const $push75=, 28 i32.add $push34=, $4, $pop75 i32.load $push35=, 0($pop34) @@ -291,10 +291,10 @@ main: # @main br_if $pop36, 6 # 6: down to label7 # BB#10: # %if.end40 # in Loop: Header=BB10_2 Depth=2 + i32.const $push81=, 13 + i32.const $push80=, 140 i64.gt_u $push37=, $1, $6 - tee_local $push81=, $5=, $pop37 - i32.const $push80=, 13 - i32.const $push79=, 140 + tee_local $push79=, $5=, $pop37 i32.select $push38=, $pop81, $pop80, $pop79 i32.const $push78=, 32 i32.add $push39=, $4, $pop78 @@ -305,7 +305,7 @@ main: # @main # in Loop: Header=BB10_2 Depth=2 i32.const $push84=, 140 i32.const $push83=, 13 - i32.select $push42=, $5, $pop84, $pop83 + i32.select $push42=, $pop84, $pop83, $5 i32.const $push82=, 36 i32.add $push43=, $4, $pop82 i32.load $push44=, 0($pop43) diff --git a/test/torture-s/cmpsf-1.c.s b/test/torture-s/cmpsf-1.c.s index 3e71ec369..73ef6c36a 100644 --- a/test/torture-s/cmpsf-1.c.s +++ b/test/torture-s/cmpsf-1.c.s @@ -8,10 +8,10 @@ feq: # @feq .param f32, f32 .result i32 # BB#0: # %entry - f32.eq $push0=, $0, $1 i32.const $push2=, 13 i32.const $push1=, 140 - i32.select $push3=, $pop0, $pop2, $pop1 + f32.eq $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end0: @@ -25,10 +25,10 @@ fne: # @fne .param f32, f32 .result i32 # BB#0: # %entry - f32.ne $push0=, $0, $1 i32.const $push2=, 13 i32.const $push1=, 140 - i32.select $push3=, $pop0, $pop2, $pop1 + f32.ne $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end1: @@ -42,10 +42,10 @@ flt: # @flt .param f32, f32 .result i32 # BB#0: # %entry - f32.lt $push0=, $0, $1 i32.const $push2=, 13 i32.const $push1=, 140 - i32.select $push3=, $pop0, $pop2, $pop1 + f32.lt $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end2: @@ -59,14 +59,14 @@ fge: # @fge .param f32, f32 .result i32 # BB#0: # %entry + i32.const $push6=, 140 + i32.const $push5=, 13 f32.lt $push0=, $0, $1 f32.ne $push2=, $0, $0 f32.ne $push1=, $1, $1 i32.or $push3=, $pop2, $pop1 i32.or $push4=, $pop0, $pop3 - i32.const $push6=, 140 - i32.const $push5=, 13 - i32.select $push7=, $pop4, $pop6, $pop5 + i32.select $push7=, $pop6, $pop5, $pop4 return $pop7 .endfunc .Lfunc_end3: @@ -80,10 +80,10 @@ fgt: # @fgt .param f32, f32 .result i32 # BB#0: # %entry - f32.gt $push0=, $0, $1 i32.const $push2=, 13 i32.const $push1=, 140 - i32.select $push3=, $pop0, $pop2, $pop1 + f32.gt $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end4: @@ -97,14 +97,14 @@ fle: # @fle .param f32, f32 .result i32 # BB#0: # %entry + i32.const $push6=, 140 + i32.const $push5=, 13 f32.gt $push0=, $0, $1 f32.ne $push2=, $0, $0 f32.ne $push1=, $1, $1 i32.or $push3=, $pop2, $pop1 i32.or $push4=, $pop0, $pop3 - i32.const $push6=, 140 - i32.const $push5=, 13 - i32.select $push7=, $pop4, $pop6, $pop5 + i32.select $push7=, $pop6, $pop5, $pop4 return $pop7 .endfunc .Lfunc_end5: @@ -139,21 +139,21 @@ main: # @main # Parent Loop BB6_1 Depth=1 # => This Inner Loop Header: Depth=2 loop # label8: + i32.const $push40=, 13 + i32.const $push39=, 140 f32.load $push0=, 0($2) - tee_local $push40=, $5=, $pop0 - f32.eq $push2=, $1, $pop40 - i32.const $push39=, 13 - i32.const $push38=, 140 - i32.select $push3=, $pop2, $pop39, $pop38 + tee_local $push38=, $5=, $pop0 + f32.eq $push2=, $1, $pop38 + i32.select $push3=, $pop40, $pop39, $pop2 i32.load $push4=, 0($4) i32.ne $push5=, $pop3, $pop4 br_if $pop5, 9 # 9: down to label0 # BB#3: # %if.end # in Loop: Header=BB6_2 Depth=2 - f32.ne $push6=, $1, $5 i32.const $push43=, 13 i32.const $push42=, 140 - i32.select $push7=, $pop6, $pop43, $pop42 + f32.ne $push6=, $1, $5 + i32.select $push7=, $pop43, $pop42, $pop6 i32.const $push41=, 4 i32.add $push8=, $4, $pop41 i32.load $push9=, 0($pop8) @@ -161,10 +161,10 @@ main: # @main br_if $pop10, 8 # 8: down to label1 # BB#4: # %if.end10 # in Loop: Header=BB6_2 Depth=2 + i32.const $push47=, 13 + i32.const $push46=, 140 f32.lt $push11=, $1, $5 - tee_local $push47=, $6=, $pop11 - i32.const $push46=, 13 - i32.const $push45=, 140 + tee_local $push45=, $6=, $pop11 i32.select $push12=, $pop47, $pop46, $pop45 i32.const $push44=, 8 i32.add $push13=, $4, $pop44 @@ -173,14 +173,14 @@ main: # @main br_if $pop15, 7 # 7: down to label2 # BB#5: # %if.end15 # in Loop: Header=BB6_2 Depth=2 + i32.const $push51=, 140 + i32.const $push50=, 13 f32.ne $push17=, $1, $1 f32.ne $push16=, $5, $5 i32.or $push18=, $pop17, $pop16 - tee_local $push51=, $7=, $pop18 - i32.or $push19=, $6, $pop51 - i32.const $push50=, 140 - i32.const $push49=, 13 - i32.select $push20=, $pop19, $pop50, $pop49 + tee_local $push49=, $7=, $pop18 + i32.or $push19=, $6, $pop49 + i32.select $push20=, $pop51, $pop50, $pop19 i32.const $push48=, 12 i32.add $push21=, $4, $pop48 i32.load $push22=, 0($pop21) @@ -188,10 +188,10 @@ main: # @main br_if $pop23, 6 # 6: down to label3 # BB#6: # %if.end20 # in Loop: Header=BB6_2 Depth=2 + i32.const $push55=, 13 + i32.const $push54=, 140 f32.gt $push24=, $1, $5 - tee_local $push55=, $6=, $pop24 - i32.const $push54=, 13 - i32.const $push53=, 140 + tee_local $push53=, $6=, $pop24 i32.select $push25=, $pop55, $pop54, $pop53 i32.const $push52=, 16 i32.add $push26=, $4, $pop52 @@ -200,10 +200,10 @@ main: # @main br_if $pop28, 5 # 5: down to label4 # BB#7: # %if.end25 # in Loop: Header=BB6_2 Depth=2 - i32.or $push29=, $6, $7 i32.const $push58=, 140 i32.const $push57=, 13 - i32.select $push30=, $pop29, $pop58, $pop57 + i32.or $push29=, $6, $7 + i32.select $push30=, $pop58, $pop57, $pop29 i32.const $push56=, 20 i32.add $push31=, $4, $pop56 i32.load $push32=, 0($pop31) diff --git a/test/torture-s/cmpsi-2.c.s b/test/torture-s/cmpsi-2.c.s index ebb5e4c0b..c7071af15 100644 --- a/test/torture-s/cmpsi-2.c.s +++ b/test/torture-s/cmpsi-2.c.s @@ -8,10 +8,10 @@ feq: # @feq .param i32, i32 .result i32 # BB#0: # %entry - i32.eq $push0=, $0, $1 i32.const $push2=, 13 i32.const $push1=, 140 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.eq $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end0: @@ -25,10 +25,10 @@ fne: # @fne .param i32, i32 .result i32 # BB#0: # %entry - i32.eq $push0=, $0, $1 i32.const $push2=, 140 i32.const $push1=, 13 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.eq $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end1: @@ -42,10 +42,10 @@ flt: # @flt .param i32, i32 .result i32 # BB#0: # %entry - i32.lt_s $push0=, $0, $1 i32.const $push2=, 13 i32.const $push1=, 140 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.lt_s $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end2: @@ -59,10 +59,10 @@ fge: # @fge .param i32, i32 .result i32 # BB#0: # %entry - i32.lt_s $push0=, $0, $1 i32.const $push2=, 140 i32.const $push1=, 13 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.lt_s $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end3: @@ -76,10 +76,10 @@ fgt: # @fgt .param i32, i32 .result i32 # BB#0: # %entry - i32.gt_s $push0=, $0, $1 i32.const $push2=, 13 i32.const $push1=, 140 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.gt_s $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end4: @@ -93,10 +93,10 @@ fle: # @fle .param i32, i32 .result i32 # BB#0: # %entry - i32.gt_s $push0=, $0, $1 i32.const $push2=, 140 i32.const $push1=, 13 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.gt_s $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end5: @@ -110,10 +110,10 @@ fltu: # @fltu .param i32, i32 .result i32 # BB#0: # %entry - i32.lt_u $push0=, $0, $1 i32.const $push2=, 13 i32.const $push1=, 140 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.lt_u $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end6: @@ -127,10 +127,10 @@ fgeu: # @fgeu .param i32, i32 .result i32 # BB#0: # %entry - i32.lt_u $push0=, $0, $1 i32.const $push2=, 140 i32.const $push1=, 13 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.lt_u $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end7: @@ -144,10 +144,10 @@ fgtu: # @fgtu .param i32, i32 .result i32 # BB#0: # %entry - i32.gt_u $push0=, $0, $1 i32.const $push2=, 13 i32.const $push1=, 140 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.gt_u $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end8: @@ -161,10 +161,10 @@ fleu: # @fleu .param i32, i32 .result i32 # BB#0: # %entry - i32.gt_u $push0=, $0, $1 i32.const $push2=, 140 i32.const $push1=, 13 - i32.select $push3=, $pop0, $pop2, $pop1 + i32.gt_u $push0=, $0, $1 + i32.select $push3=, $pop2, $pop1, $pop0 return $pop3 .endfunc .Lfunc_end9: @@ -203,13 +203,13 @@ main: # @main # Parent Loop BB10_1 Depth=1 # => This Inner Loop Header: Depth=2 loop # label12: + i32.const $push53=, 13 + i32.const $push52=, 140 i32.load $push0=, 0($2) - tee_local $push53=, $6=, $pop0 - i32.eq $push2=, $1, $pop53 - tee_local $push52=, $5=, $pop2 - i32.const $push51=, 13 - i32.const $push50=, 140 - i32.select $push3=, $pop52, $pop51, $pop50 + tee_local $push51=, $6=, $pop0 + i32.eq $push2=, $1, $pop51 + tee_local $push50=, $5=, $pop2 + i32.select $push3=, $pop53, $pop52, $pop50 i32.load $push4=, 0($4) i32.ne $push5=, $pop3, $pop4 br_if $pop5, 13 # 13: down to label0 @@ -217,7 +217,7 @@ main: # @main # in Loop: Header=BB10_2 Depth=2 i32.const $push56=, 140 i32.const $push55=, 13 - i32.select $push6=, $5, $pop56, $pop55 + i32.select $push6=, $pop56, $pop55, $5 i32.const $push54=, 4 i32.add $push7=, $4, $pop54 i32.load $push8=, 0($pop7) @@ -225,10 +225,10 @@ main: # @main br_if $pop9, 12 # 12: down to label1 # BB#4: # %if.end10 # in Loop: Header=BB10_2 Depth=2 + i32.const $push60=, 13 + i32.const $push59=, 140 i32.lt_s $push10=, $1, $6 - tee_local $push60=, $5=, $pop10 - i32.const $push59=, 13 - i32.const $push58=, 140 + tee_local $push58=, $5=, $pop10 i32.select $push11=, $pop60, $pop59, $pop58 i32.const $push57=, 8 i32.add $push12=, $4, $pop57 @@ -239,7 +239,7 @@ main: # @main # in Loop: Header=BB10_2 Depth=2 i32.const $push63=, 140 i32.const $push62=, 13 - i32.select $push15=, $5, $pop63, $pop62 + i32.select $push15=, $pop63, $pop62, $5 i32.const $push61=, 12 i32.add $push16=, $4, $pop61 i32.load $push17=, 0($pop16) @@ -247,10 +247,10 @@ main: # @main br_if $pop18, 10 # 10: down to label3 # BB#6: # %if.end20 # in Loop: Header=BB10_2 Depth=2 + i32.const $push67=, 13 + i32.const $push66=, 140 i32.gt_s $push19=, $1, $6 - tee_local $push67=, $5=, $pop19 - i32.const $push66=, 13 - i32.const $push65=, 140 + tee_local $push65=, $5=, $pop19 i32.select $push20=, $pop67, $pop66, $pop65 i32.const $push64=, 16 i32.add $push21=, $4, $pop64 @@ -261,7 +261,7 @@ main: # @main # in Loop: Header=BB10_2 Depth=2 i32.const $push70=, 140 i32.const $push69=, 13 - i32.select $push24=, $5, $pop70, $pop69 + i32.select $push24=, $pop70, $pop69, $5 i32.const $push68=, 20 i32.add $push25=, $4, $pop68 i32.load $push26=, 0($pop25) @@ -269,10 +269,10 @@ main: # @main br_if $pop27, 8 # 8: down to label5 # BB#8: # %if.end30 # in Loop: Header=BB10_2 Depth=2 + i32.const $push74=, 13 + i32.const $push73=, 140 i32.lt_u $push28=, $1, $6 - tee_local $push74=, $5=, $pop28 - i32.const $push73=, 13 - i32.const $push72=, 140 + tee_local $push72=, $5=, $pop28 i32.select $push29=, $pop74, $pop73, $pop72 i32.const $push71=, 24 i32.add $push30=, $4, $pop71 @@ -283,7 +283,7 @@ main: # @main # in Loop: Header=BB10_2 Depth=2 i32.const $push77=, 140 i32.const $push76=, 13 - i32.select $push33=, $5, $pop77, $pop76 + i32.select $push33=, $pop77, $pop76, $5 i32.const $push75=, 28 i32.add $push34=, $4, $pop75 i32.load $push35=, 0($pop34) @@ -291,10 +291,10 @@ main: # @main br_if $pop36, 6 # 6: down to label7 # BB#10: # %if.end40 # in Loop: Header=BB10_2 Depth=2 + i32.const $push81=, 13 + i32.const $push80=, 140 i32.gt_u $push37=, $1, $6 - tee_local $push81=, $6=, $pop37 - i32.const $push80=, 13 - i32.const $push79=, 140 + tee_local $push79=, $6=, $pop37 i32.select $push38=, $pop81, $pop80, $pop79 i32.const $push78=, 32 i32.add $push39=, $4, $pop78 @@ -305,7 +305,7 @@ main: # @main # in Loop: Header=BB10_2 Depth=2 i32.const $push84=, 140 i32.const $push83=, 13 - i32.select $push42=, $6, $pop84, $pop83 + i32.select $push42=, $pop84, $pop83, $6 i32.const $push82=, 36 i32.add $push43=, $4, $pop82 i32.load $push44=, 0($pop43) diff --git a/test/torture-s/compndlit-1.c.s b/test/torture-s/compndlit-1.c.s index 3ff8c1740..925fa7582 100644 --- a/test/torture-s/compndlit-1.c.s +++ b/test/torture-s/compndlit-1.c.s @@ -9,6 +9,8 @@ main: # @main .local i32 # BB#0: # %entry i32.const $push10=, 0 + i32.const $push6=, 160 + i32.const $push5=, 320 i32.const $push9=, 0 i32.load $push0=, x($pop9) i32.const $push1=, 7 @@ -16,9 +18,7 @@ main: # @main i32.const $push3=, 1 i32.eq $push4=, $pop2, $pop3 tee_local $push8=, $0=, $pop4 - i32.const $push6=, 160 - i32.const $push5=, 320 - i32.select $push7=, $pop8, $pop6, $pop5 + i32.select $push7=, $pop6, $pop5, $pop8 i32.store $discard=, x($pop10), $pop7 block i32.const $push12=, 0 diff --git a/test/torture-s/dbra-1.c.s b/test/torture-s/dbra-1.c.s index 7cad94d18..aab867504 100644 --- a/test/torture-s/dbra-1.c.s +++ b/test/torture-s/dbra-1.c.s @@ -56,10 +56,10 @@ f1: # @f1 br_if $pop7, 0 # 0: down to label0 # BB#9: # %for.inc.8 i32.const $push8=, 9 - i32.eq $push9=, $0, $pop8 - i32.const $push20=, 9 i32.const $push10=, -1 - i32.select $push11=, $pop9, $pop20, $pop10 + i32.const $push20=, 9 + i32.eq $push9=, $0, $pop20 + i32.select $push11=, $pop8, $pop10, $pop9 return $pop11 .LBB0_10: # %cleanup end_block # label0: @@ -138,11 +138,11 @@ f3: # @f3 i32.eq $push16=, $0, $pop21 br_if $pop16, 0 # 0: down to label1 # BB#9: # %for.inc.8 - i32.const $push17=, 10 - i32.eq $push18=, $0, $pop17 i32.const $push22=, 9 i32.const $push19=, -1 - i32.select $push20=, $pop18, $pop22, $pop19 + i32.const $push17=, 10 + i32.eq $push18=, $0, $pop17 + i32.select $push20=, $pop22, $pop19, $pop18 return $pop20 .LBB2_10: # %cleanup end_block # label1: @@ -221,11 +221,11 @@ f5: # @f5 i32.eq $push17=, $0, $pop16 br_if $pop17, 0 # 0: down to label2 # BB#9: # %for.inc.8 - i32.const $push18=, -10 - i32.eq $push19=, $0, $pop18 i32.const $push21=, 9 i32.const $push20=, -1 - i32.select $push22=, $pop19, $pop21, $pop20 + i32.const $push18=, -10 + i32.eq $push19=, $0, $pop18 + i32.select $push22=, $pop21, $pop20, $pop19 return $pop22 .LBB4_10: # %cleanup end_block # label2: diff --git a/test/torture-s/extzvsi.c.s b/test/torture-s/extzvsi.c.s index e648d4989..b7ebeef7b 100644 --- a/test/torture-s/extzvsi.c.s +++ b/test/torture-s/extzvsi.c.s @@ -13,14 +13,15 @@ foo: # @foo i32.const $push2=, 1 i32.shr_u $push3=, $pop1, $pop2 i32.const $push4=, 2047 - i32.and $0=, $pop3, $pop4 + i32.and $push5=, $pop3, $pop4 + tee_local $push12=, $0=, $pop5 + i32.const $push11=, 1 + i32.gt_u $push6=, $pop12, $pop11 i32.const $push10=, 1 - i32.gt_u $push5=, $0, $pop10 + i32.shl $push7=, $pop6, $pop10 i32.const $push9=, 1 - i32.shl $push6=, $pop5, $pop9 - i32.const $push8=, 1 - i32.select $push7=, $0, $pop6, $pop8 - return $pop7 + i32.select $push8=, $pop7, $pop9, $0 + return $pop8 .endfunc .Lfunc_end0: .size foo, .Lfunc_end0-foo diff --git a/test/torture-s/ffs-2.c.s b/test/torture-s/ffs-2.c.s index 6f1623adc..23de968cb 100644 --- a/test/torture-s/ffs-2.c.s +++ b/test/torture-s/ffs-2.c.s @@ -8,129 +8,137 @@ main: # @main .result i32 .local i32, i64 # BB#0: # %entry - i32.const $push61=, 0 - i64.load $push0=, ffstesttab($pop61):p2align=4 - tee_local $push60=, $1=, $pop0 - i32.wrap/i64 $0=, $pop60 block - i32.ctz $push1=, $0 - i32.const $push59=, 1 - i32.add $push2=, $pop1, $pop59 - i32.const $push58=, 0 - i32.select $push3=, $0, $pop2, $pop58 - i64.const $push57=, 32 - i64.shr_u $push4=, $1, $pop57 - i32.wrap/i64 $push5=, $pop4 - i32.ne $push6=, $pop3, $pop5 - br_if $pop6, 0 # 0: down to label0 -# BB#1: # %for.cond + i32.const $push70=, 0 + i64.load $push0=, ffstesttab($pop70):p2align=4 + tee_local $push69=, $1=, $pop0 + i32.wrap/i64 $push1=, $pop69 + tee_local $push68=, $0=, $pop1 + i32.ctz $push2=, $pop68 + i32.const $push67=, 1 + i32.add $push3=, $pop2, $pop67 i32.const $push66=, 0 - i64.load $push7=, ffstesttab+8($pop66) - tee_local $push65=, $1=, $pop7 - i32.wrap/i64 $0=, $pop65 - i32.ctz $push8=, $0 - i32.const $push64=, 1 - i32.add $push9=, $pop8, $pop64 - i32.const $push63=, 0 - i32.select $push10=, $0, $pop9, $pop63 - i64.const $push62=, 32 - i64.shr_u $push11=, $1, $pop62 - i32.wrap/i64 $push12=, $pop11 - i32.ne $push13=, $pop10, $pop12 - br_if $pop13, 0 # 0: down to label0 -# BB#2: # %for.cond.1 - i32.const $push71=, 0 - i64.load $push14=, ffstesttab+16($pop71):p2align=4 - tee_local $push70=, $1=, $pop14 - i32.wrap/i64 $0=, $pop70 - i32.ctz $push15=, $0 - i32.const $push69=, 1 - i32.add $push16=, $pop15, $pop69 - i32.const $push68=, 0 - i32.select $push17=, $0, $pop16, $pop68 - i64.const $push67=, 32 - i64.shr_u $push18=, $1, $pop67 - i32.wrap/i64 $push19=, $pop18 - i32.ne $push20=, $pop17, $pop19 - br_if $pop20, 0 # 0: down to label0 -# BB#3: # %for.cond.2 + i32.select $push4=, $pop3, $pop66, $0 + i64.const $push65=, 32 + i64.shr_u $push5=, $1, $pop65 + i32.wrap/i64 $push6=, $pop5 + i32.ne $push7=, $pop4, $pop6 + br_if $pop7, 0 # 0: down to label0 +# BB#1: # %for.cond i32.const $push76=, 0 - i64.load $push21=, ffstesttab+24($pop76) - tee_local $push75=, $1=, $pop21 - i32.wrap/i64 $0=, $pop75 - i32.ctz $push22=, $0 - i32.const $push74=, 1 - i32.add $push23=, $pop22, $pop74 - i32.const $push73=, 0 - i32.select $push24=, $0, $pop23, $pop73 - i64.const $push72=, 32 - i64.shr_u $push25=, $1, $pop72 - i32.wrap/i64 $push26=, $pop25 - i32.ne $push27=, $pop24, $pop26 - br_if $pop27, 0 # 0: down to label0 -# BB#4: # %for.cond.3 - i32.const $push81=, 0 - i64.load $push28=, ffstesttab+32($pop81):p2align=4 - tee_local $push80=, $1=, $pop28 - i32.wrap/i64 $0=, $pop80 - i32.ctz $push29=, $0 + i64.load $push8=, ffstesttab+8($pop76) + tee_local $push75=, $1=, $pop8 + i32.wrap/i64 $push9=, $pop75 + tee_local $push74=, $0=, $pop9 + i32.ctz $push10=, $pop74 + i32.const $push73=, 1 + i32.add $push11=, $pop10, $pop73 + i32.const $push72=, 0 + i32.select $push12=, $pop11, $pop72, $0 + i64.const $push71=, 32 + i64.shr_u $push13=, $1, $pop71 + i32.wrap/i64 $push14=, $pop13 + i32.ne $push15=, $pop12, $pop14 + br_if $pop15, 0 # 0: down to label0 +# BB#2: # %for.cond.1 + i32.const $push82=, 0 + i64.load $push16=, ffstesttab+16($pop82):p2align=4 + tee_local $push81=, $1=, $pop16 + i32.wrap/i64 $push17=, $pop81 + tee_local $push80=, $0=, $pop17 + i32.ctz $push18=, $pop80 i32.const $push79=, 1 - i32.add $push30=, $pop29, $pop79 + i32.add $push19=, $pop18, $pop79 i32.const $push78=, 0 - i32.select $push31=, $0, $pop30, $pop78 + i32.select $push20=, $pop19, $pop78, $0 i64.const $push77=, 32 - i64.shr_u $push32=, $1, $pop77 - i32.wrap/i64 $push33=, $pop32 - i32.ne $push34=, $pop31, $pop33 - br_if $pop34, 0 # 0: down to label0 -# BB#5: # %for.cond.4 - i32.const $push86=, 0 - i64.load $push35=, ffstesttab+40($pop86) - tee_local $push85=, $1=, $pop35 - i32.wrap/i64 $0=, $pop85 - i32.ctz $push36=, $0 - i32.const $push84=, 1 - i32.add $push37=, $pop36, $pop84 - i32.const $push83=, 0 - i32.select $push38=, $0, $pop37, $pop83 - i64.const $push82=, 32 - i64.shr_u $push39=, $1, $pop82 - i32.wrap/i64 $push40=, $pop39 - i32.ne $push41=, $pop38, $pop40 - br_if $pop41, 0 # 0: down to label0 -# BB#6: # %for.cond.5 - i32.const $push91=, 0 - i64.load $push42=, ffstesttab+48($pop91):p2align=4 - tee_local $push90=, $1=, $pop42 - i32.wrap/i64 $0=, $pop90 - i32.ctz $push43=, $0 - i32.const $push89=, 1 - i32.add $push44=, $pop43, $pop89 + i64.shr_u $push21=, $1, $pop77 + i32.wrap/i64 $push22=, $pop21 + i32.ne $push23=, $pop20, $pop22 + br_if $pop23, 0 # 0: down to label0 +# BB#3: # %for.cond.2 i32.const $push88=, 0 - i32.select $push45=, $0, $pop44, $pop88 - i64.const $push87=, 32 - i64.shr_u $push46=, $1, $pop87 - i32.wrap/i64 $push47=, $pop46 - i32.ne $push48=, $pop45, $pop47 - br_if $pop48, 0 # 0: down to label0 -# BB#7: # %for.cond.6 + i64.load $push24=, ffstesttab+24($pop88) + tee_local $push87=, $1=, $pop24 + i32.wrap/i64 $push25=, $pop87 + tee_local $push86=, $0=, $pop25 + i32.ctz $push26=, $pop86 + i32.const $push85=, 1 + i32.add $push27=, $pop26, $pop85 + i32.const $push84=, 0 + i32.select $push28=, $pop27, $pop84, $0 + i64.const $push83=, 32 + i64.shr_u $push29=, $1, $pop83 + i32.wrap/i64 $push30=, $pop29 + i32.ne $push31=, $pop28, $pop30 + br_if $pop31, 0 # 0: down to label0 +# BB#4: # %for.cond.3 + i32.const $push94=, 0 + i64.load $push32=, ffstesttab+32($pop94):p2align=4 + tee_local $push93=, $1=, $pop32 + i32.wrap/i64 $push33=, $pop93 + tee_local $push92=, $0=, $pop33 + i32.ctz $push34=, $pop92 + i32.const $push91=, 1 + i32.add $push35=, $pop34, $pop91 + i32.const $push90=, 0 + i32.select $push36=, $pop35, $pop90, $0 + i64.const $push89=, 32 + i64.shr_u $push37=, $1, $pop89 + i32.wrap/i64 $push38=, $pop37 + i32.ne $push39=, $pop36, $pop38 + br_if $pop39, 0 # 0: down to label0 +# BB#5: # %for.cond.4 + i32.const $push100=, 0 + i64.load $push40=, ffstesttab+40($pop100) + tee_local $push99=, $1=, $pop40 + i32.wrap/i64 $push41=, $pop99 + tee_local $push98=, $0=, $pop41 + i32.ctz $push42=, $pop98 + i32.const $push97=, 1 + i32.add $push43=, $pop42, $pop97 i32.const $push96=, 0 - i64.load $push49=, ffstesttab+56($pop96) - tee_local $push95=, $1=, $pop49 - i32.wrap/i64 $0=, $pop95 - i32.ctz $push50=, $0 - i32.const $push94=, 1 - i32.add $push51=, $pop50, $pop94 - i32.const $push93=, 0 - i32.select $push52=, $0, $pop51, $pop93 - i64.const $push92=, 32 - i64.shr_u $push53=, $1, $pop92 + i32.select $push44=, $pop43, $pop96, $0 + i64.const $push95=, 32 + i64.shr_u $push45=, $1, $pop95 + i32.wrap/i64 $push46=, $pop45 + i32.ne $push47=, $pop44, $pop46 + br_if $pop47, 0 # 0: down to label0 +# BB#6: # %for.cond.5 + i32.const $push106=, 0 + i64.load $push48=, ffstesttab+48($pop106):p2align=4 + tee_local $push105=, $1=, $pop48 + i32.wrap/i64 $push49=, $pop105 + tee_local $push104=, $0=, $pop49 + i32.ctz $push50=, $pop104 + i32.const $push103=, 1 + i32.add $push51=, $pop50, $pop103 + i32.const $push102=, 0 + i32.select $push52=, $pop51, $pop102, $0 + i64.const $push101=, 32 + i64.shr_u $push53=, $1, $pop101 i32.wrap/i64 $push54=, $pop53 i32.ne $push55=, $pop52, $pop54 br_if $pop55, 0 # 0: down to label0 +# BB#7: # %for.cond.6 + i32.const $push112=, 0 + i64.load $push56=, ffstesttab+56($pop112) + tee_local $push111=, $1=, $pop56 + i32.wrap/i64 $push57=, $pop111 + tee_local $push110=, $0=, $pop57 + i32.ctz $push58=, $pop110 + i32.const $push109=, 1 + i32.add $push59=, $pop58, $pop109 + i32.const $push108=, 0 + i32.select $push60=, $pop59, $pop108, $0 + i64.const $push107=, 32 + i64.shr_u $push61=, $1, $pop107 + i32.wrap/i64 $push62=, $pop61 + i32.ne $push63=, $pop60, $pop62 + br_if $pop63, 0 # 0: down to label0 # BB#8: # %for.cond.7 - i32.const $push56=, 0 - call exit@FUNCTION, $pop56 + i32.const $push64=, 0 + call exit@FUNCTION, $pop64 unreachable .LBB0_9: # %if.then end_block # label0: diff --git a/test/torture-s/ipa-sra-2.c.s b/test/torture-s/ipa-sra-2.c.s index a8ca7a029..f55f993ef 100644 --- a/test/torture-s/ipa-sra-2.c.s +++ b/test/torture-s/ipa-sra-2.c.s @@ -30,7 +30,7 @@ foo: # @foo # BB#0: # %entry i32.const $push0=, 3999996 i32.add $push1=, $1, $pop0 - i32.select $push2=, $0, $pop1, $1 + i32.select $push2=, $pop1, $1, $0 i32.load $push3=, 0($pop2) return $pop3 .endfunc diff --git a/test/torture-s/loop-3.c.s b/test/torture-s/loop-3.c.s index 60a757f77..0a0cc54f0 100644 --- a/test/torture-s/loop-3.c.s +++ b/test/torture-s/loop-3.c.s @@ -33,9 +33,9 @@ f: # @f i32.load $push1=, n($pop12) i32.add $push2=, $pop1, $0 i32.const $push3=, 1 - i32.lt_s $push4=, $0, $pop3 i32.const $push11=, 1 - i32.select $push5=, $pop4, $0, $pop11 + i32.lt_s $push4=, $0, $pop11 + i32.select $push5=, $0, $pop3, $pop4 i32.const $push6=, -1 i32.xor $push7=, $pop5, $pop6 i32.add $push8=, $pop2, $pop7 diff --git a/test/torture-s/loop-3b.c.s b/test/torture-s/loop-3b.c.s index 453d47d27..6066962ec 100644 --- a/test/torture-s/loop-3b.c.s +++ b/test/torture-s/loop-3b.c.s @@ -32,9 +32,9 @@ f: # @f i32.const $push16=, 0 i32.load $push1=, n($pop16) i32.const $push2=, 268435455 - i32.lt_s $push3=, $0, $pop2 i32.const $push15=, 268435455 - i32.select $push4=, $pop3, $0, $pop15 + i32.lt_s $push3=, $0, $pop15 + i32.select $push4=, $0, $pop2, $pop3 i32.const $push5=, -1 i32.xor $push6=, $pop4, $pop5 i32.add $push7=, $0, $pop6 diff --git a/test/torture-s/loop-7.c.s b/test/torture-s/loop-7.c.s index b86d7939c..d5a70d8cd 100644 --- a/test/torture-s/loop-7.c.s +++ b/test/torture-s/loop-7.c.s @@ -16,7 +16,7 @@ foo: # @foo i32.const $push8=, 1 i32.shl $push0=, $pop8, $2 i32.eq $push1=, $pop0, $0 - i32.select $1=, $pop1, $2, $1 + i32.select $1=, $2, $1, $pop1 i32.const $push7=, 1 i32.add $2=, $2, $pop7 i32.const $push6=, 9 diff --git a/test/torture-s/memcpy-2.c.s b/test/torture-s/memcpy-2.c.s index 031722e4b..345805a6b 100644 --- a/test/torture-s/memcpy-2.c.s +++ b/test/torture-s/memcpy-2.c.s @@ -55,14 +55,14 @@ main: # @main # Parent Loop BB0_3 Depth=3 # => This Inner Loop Header: Depth=4 loop # label8: - i32.const $push57=, 24 - i32.shl $push2=, $6, $pop57 + i32.const $push57=, 65 i32.const $push56=, 24 - i32.shr_s $push3=, $pop2, $pop56 - i32.const $push55=, 95 - i32.gt_s $push4=, $pop3, $pop55 - i32.const $push54=, 65 - i32.select $push5=, $pop4, $pop54, $6 + i32.shl $push2=, $6, $pop56 + i32.const $push55=, 24 + i32.shr_s $push3=, $pop2, $pop55 + i32.const $push54=, 95 + i32.gt_s $push4=, $pop3, $pop54 + i32.select $push5=, $pop57, $6, $pop4 i32.store8 $push6=, u2+96($8), $pop5 i32.const $push53=, 1 i32.add $6=, $pop6, $pop53 @@ -116,14 +116,14 @@ main: # @main loop # label13: i32.add $push15=, $7, $8 i32.load8_u $push16=, 0($pop15) - i32.const $push67=, 24 - i32.shl $push11=, $6, $pop67 + i32.const $push67=, 65 i32.const $push66=, 24 - i32.shr_s $push12=, $pop11, $pop66 - i32.const $push65=, 95 - i32.gt_s $push13=, $pop12, $pop65 - i32.const $push64=, 65 - i32.select $push0=, $pop13, $pop64, $6 + i32.shl $push11=, $6, $pop66 + i32.const $push65=, 24 + i32.shr_s $push12=, $pop11, $pop65 + i32.const $push64=, 95 + i32.gt_s $push13=, $pop12, $pop64 + i32.select $push0=, $pop67, $6, $pop13 tee_local $push63=, $6=, $pop0 i32.const $push62=, 255 i32.and $push14=, $pop63, $pop62 diff --git a/test/torture-s/nestfunc-4.c.s b/test/torture-s/nestfunc-4.c.s index 9741d15f5..398edcaac 100644 --- a/test/torture-s/nestfunc-4.c.s +++ b/test/torture-s/nestfunc-4.c.s @@ -9,18 +9,17 @@ main: # @main .local i32 # BB#0: # %if.then i32.const $push0=, 0 - i32.const $push10=, 0 - i32.load $push1=, level($pop10) - tee_local $push9=, $0=, $pop1 - i32.const $push2=, 499 - i32.gt_s $push3=, $pop9, $pop2 - i32.const $push8=, 499 - i32.select $push4=, $pop3, $0, $pop8 - i32.const $push5=, 1 - i32.add $push6=, $pop4, $pop5 - i32.store $discard=, level($pop0), $pop6 - i32.const $push7=, 0 - call exit@FUNCTION, $pop7 + i32.load $0=, level($pop0) + i32.const $push8=, 0 + i32.const $push1=, 499 + i32.const $push7=, 499 + i32.gt_s $push2=, $0, $pop7 + i32.select $push3=, $0, $pop1, $pop2 + i32.const $push4=, 1 + i32.add $push5=, $pop3, $pop4 + i32.store $discard=, level($pop8), $pop5 + i32.const $push6=, 0 + call exit@FUNCTION, $pop6 unreachable .endfunc .Lfunc_end0: @@ -35,18 +34,17 @@ foo: # @foo .local i32 # BB#0: # %entry i32.const $push0=, 0 - i32.const $push10=, 0 - i32.load $push1=, level($pop10) - tee_local $push9=, $0=, $pop1 - i32.const $push2=, 499 - i32.gt_s $push3=, $pop9, $pop2 - i32.const $push8=, 499 - i32.select $push4=, $pop3, $0, $pop8 - i32.const $push5=, 1 - i32.add $push6=, $pop4, $pop5 - i32.store $discard=, level($pop0), $pop6 - i32.const $push7=, -42 - return $pop7 + i32.load $0=, level($pop0) + i32.const $push8=, 0 + i32.const $push1=, 499 + i32.const $push7=, 499 + i32.gt_s $push2=, $0, $pop7 + i32.select $push3=, $0, $pop1, $pop2 + i32.const $push4=, 1 + i32.add $push5=, $pop3, $pop4 + i32.store $discard=, level($pop8), $pop5 + i32.const $push6=, -42 + return $pop6 .endfunc .Lfunc_end1: .size foo, .Lfunc_end1-foo diff --git a/test/torture-s/pr15262.c.s b/test/torture-s/pr15262.c.s index c785a1175..52dd25ed0 100644 --- a/test/torture-s/pr15262.c.s +++ b/test/torture-s/pr15262.c.s @@ -35,7 +35,7 @@ foo: # @foo i32.add $6=, $8, $6 i32.const $7=, 12 i32.add $7=, $8, $7 - i32.select $push0=, $1, $6, $7 + i32.select $push0=, $6, $7, $1 i32.const $push1=, 1084647014 i32.store $discard=, 0($pop0), $pop1 i32.const $5=, 16 diff --git a/test/torture-s/pr20100-1.c.s b/test/torture-s/pr20100-1.c.s index efb7ee0ff..4e4b5c408 100644 --- a/test/torture-s/pr20100-1.c.s +++ b/test/torture-s/pr20100-1.c.s @@ -14,13 +14,13 @@ frob: # @frob i32.const $push13=, 0 i32.store16 $discard=, p($pop13), $1 i32.const $push12=, 0 - i32.const $push1=, -1 - i32.add $push2=, $2, $pop1 - i32.eq $push3=, $0, $pop2 i32.const $push11=, 0 i32.const $push4=, 1 i32.add $push5=, $0, $pop4 - i32.select $push6=, $pop3, $pop11, $pop5 + i32.const $push1=, -1 + i32.add $push2=, $2, $pop1 + i32.eq $push3=, $0, $pop2 + i32.select $push6=, $pop11, $pop5, $pop3 tee_local $push10=, $0=, $pop6 i32.store16 $discard=, g($pop12), $pop10 i32.const $push7=, 65535 @@ -58,14 +58,14 @@ get_n: # @get_n .LBB1_2: # %while.body # =>This Inner Loop Header: Depth=1 loop # label1: - i32.const $push26=, 65535 - i32.and $push4=, $2, $pop26 - tee_local $push25=, $2=, $pop4 - i32.eq $push5=, $pop25, $0 - i32.const $push24=, 0 + i32.const $push26=, 0 + i32.const $push25=, 65535 + i32.and $push4=, $2, $pop25 + tee_local $push24=, $2=, $pop4 i32.const $push23=, 1 - i32.add $push6=, $2, $pop23 - i32.select $2=, $pop5, $pop24, $pop6 + i32.add $push6=, $pop24, $pop23 + i32.eq $push5=, $2, $0 + i32.select $2=, $pop26, $pop6, $pop5 i32.const $push22=, 1 i32.add $1=, $1, $pop22 i32.const $push21=, 65535 diff --git a/test/torture-s/pr20187-1.c.s b/test/torture-s/pr20187-1.c.s index c7ae01055..6bd450b07 100644 --- a/test/torture-s/pr20187-1.c.s +++ b/test/torture-s/pr20187-1.c.s @@ -15,7 +15,7 @@ test: # @test tee_local $push11=, $0=, $pop1 i32.mul $push5=, $pop4, $pop11 i32.const $push2=, 1 - i32.select $push3=, $0, $0, $pop2 + i32.select $push3=, $0, $pop2, $0 i32.and $push6=, $pop5, $pop3 i32.const $push7=, 255 i32.and $push8=, $pop6, $pop7 @@ -41,7 +41,7 @@ main: # @main tee_local $push11=, $0=, $pop1 i32.mul $push5=, $pop4, $pop11 i32.const $push2=, 1 - i32.select $push3=, $0, $0, $pop2 + i32.select $push3=, $0, $pop2, $0 i32.and $push6=, $pop5, $pop3 i32.const $push7=, 255 i32.and $push8=, $pop6, $pop7 diff --git a/test/torture-s/pr20601-1.c.s b/test/torture-s/pr20601-1.c.s index b50e3991b..0513cb82c 100644 --- a/test/torture-s/pr20601-1.c.s +++ b/test/torture-s/pr20601-1.c.s @@ -98,11 +98,11 @@ main: # @main i32.ne $push17=, $3, $pop50 br_if $pop17, 2 # 2: down to label6 # BB#8: # %sw.bb22.i - i32.const $push21=, 1 - i32.eq $push22=, $1, $pop21 i32.const $push23=, 1536 i32.or $push24=, $1, $pop23 - i32.select $1=, $pop22, $pop24, $1 + i32.const $push21=, 1 + i32.eq $push22=, $1, $pop21 + i32.select $1=, $pop24, $1, $pop22 i32.const $push19=, 0 i32.const $push18=, -1 i32.add $push4=, $4, $pop18 diff --git a/test/torture-s/pr22630.c.s b/test/torture-s/pr22630.c.s index 84f9e6f78..8a133005e 100644 --- a/test/torture-s/pr22630.c.s +++ b/test/torture-s/pr22630.c.s @@ -9,7 +9,7 @@ bla: # @bla # BB#0: # %entry block i32.const $push0=, j - i32.select $push1=, $0, $0, $pop0 + i32.select $push1=, $0, $pop0, $0 i32.eq $push2=, $pop1, $0 br_if $pop2, 0 # 0: down to label0 # BB#1: # %if.then1 diff --git a/test/torture-s/pr27285.c.s b/test/torture-s/pr27285.c.s index 55a442822..4781a84bf 100644 --- a/test/torture-s/pr27285.c.s +++ b/test/torture-s/pr27285.c.s @@ -23,21 +23,21 @@ foo: # @foo # =>This Inner Loop Header: Depth=1 loop # label1: i32.load8_u $push6=, 0($0) - i32.const $push19=, 7 - i32.gt_s $push1=, $2, $pop19 - tee_local $push18=, $3=, $pop1 - i32.const $push17=, 255 - i32.const $push16=, 255 - i32.const $push15=, 8 - i32.sub $push3=, $pop15, $2 - i32.shl $push4=, $pop16, $pop3 - i32.select $push5=, $pop18, $pop17, $pop4 + i32.const $push19=, 255 + i32.const $push18=, 255 + i32.const $push17=, 8 + i32.sub $push3=, $pop17, $2 + i32.shl $push4=, $pop18, $pop3 + i32.const $push16=, 7 + i32.gt_s $push1=, $2, $pop16 + tee_local $push15=, $3=, $pop1 + i32.select $push5=, $pop19, $pop4, $pop15 i32.and $push7=, $pop6, $pop5 i32.store8 $discard=, 0($1), $pop7 i32.const $push14=, -8 i32.add $push2=, $2, $pop14 i32.const $push13=, 0 - i32.select $2=, $3, $pop2, $pop13 + i32.select $2=, $pop2, $pop13, $3 i32.const $push12=, 1 i32.add $0=, $0, $pop12 i32.const $push11=, 1 diff --git a/test/torture-s/pr28289.c.s b/test/torture-s/pr28289.c.s index 203de2730..bec2f01b0 100644 --- a/test/torture-s/pr28289.c.s +++ b/test/torture-s/pr28289.c.s @@ -9,7 +9,7 @@ ix86_split_ashr: # @ix86_split_ashr # BB#0: # %entry i32.const $push1=, ok@FUNCTION i32.const $push0=, gen_x86_64_shrd@FUNCTION - i32.select $push2=, $0, $pop1, $pop0 + i32.select $push2=, $pop1, $pop0, $0 i32.const $push3=, 0 i32.call_indirect $discard=, $pop2, $pop3 return @@ -50,11 +50,11 @@ gen_x86_64_shrd: # @gen_x86_64_shrd main: # @main .result i32 # BB#0: # %entry - i32.const $push0=, 0 - i32.load $push1=, one($pop0) i32.const $push3=, ok@FUNCTION i32.const $push2=, gen_x86_64_shrd@FUNCTION - i32.select $push4=, $pop1, $pop3, $pop2 + i32.const $push0=, 0 + i32.load $push1=, one($pop0) + i32.select $push4=, $pop3, $pop2, $pop1 i32.const $push6=, 0 i32.call_indirect $discard=, $pop4, $pop6 i32.const $push5=, 1 diff --git a/test/torture-s/pr29695-2.c.s b/test/torture-s/pr29695-2.c.s index ab00309c7..aa37c0eab 100644 --- a/test/torture-s/pr29695-2.c.s +++ b/test/torture-s/pr29695-2.c.s @@ -115,13 +115,13 @@ f6: # @f6 f7: # @f7 .result i64 # BB#0: # %entry + i64.const $push4=, 15032385536 + i64.const $push3=, 0 i32.const $push0=, 0 i32.load $push1=, d($pop0) i32.const $push6=, 0 i32.lt_s $push2=, $pop1, $pop6 - i64.const $push4=, 15032385536 - i64.const $push3=, 0 - i64.select $push5=, $pop2, $pop4, $pop3 + i64.select $push5=, $pop4, $pop3, $pop2 return $pop5 .endfunc .Lfunc_end6: @@ -134,13 +134,13 @@ f7: # @f7 f8: # @f8 .result i64 # BB#0: # %entry + i64.const $push4=, -2147483648 + i64.const $push3=, 0 i32.const $push0=, 0 i32.load $push1=, d($pop0) i32.const $push6=, 0 i32.lt_s $push2=, $pop1, $pop6 - i64.const $push4=, -2147483648 - i64.const $push3=, 0 - i64.select $push5=, $pop2, $pop4, $pop3 + i64.select $push5=, $pop4, $pop3, $pop2 return $pop5 .endfunc .Lfunc_end7: diff --git a/test/torture-s/pr34099-2.c.s b/test/torture-s/pr34099-2.c.s index 43d9e6b89..5117edd43 100644 --- a/test/torture-s/pr34099-2.c.s +++ b/test/torture-s/pr34099-2.c.s @@ -56,7 +56,7 @@ test4: # @test4 i32.const $push0=, 0 i32.eq $push1=, $1, $pop0 i32.const $push2=, 1 - i32.select $push3=, $0, $pop1, $pop2 + i32.select $push3=, $pop1, $pop2, $0 return $pop3 .endfunc .Lfunc_end3: diff --git a/test/torture-s/pr34130.c.s b/test/torture-s/pr34130.c.s index 6a71ac97d..fee1d97ee 100644 --- a/test/torture-s/pr34130.c.s +++ b/test/torture-s/pr34130.c.s @@ -9,19 +9,18 @@ foo: # @foo .result i32 .local i32 # BB#0: # %entry - i32.const $push9=, 0 i32.const $push0=, -2 - i32.add $push1=, $0, $pop0 - tee_local $push11=, $1=, $pop1 - i32.const $push4=, -1 - i32.gt_s $push5=, $pop11, $pop4 - i32.const $push2=, 2 - i32.sub $push3=, $pop2, $0 - i32.select $push6=, $pop5, $1, $pop3 - i32.const $push7=, 1 - i32.shl $push8=, $pop6, $pop7 - i32.sub $push10=, $pop9, $pop8 - return $pop10 + i32.add $1=, $0, $pop0 + i32.const $push8=, 0 + i32.const $push1=, 2 + i32.sub $push2=, $pop1, $0 + i32.const $push3=, -1 + i32.gt_s $push4=, $1, $pop3 + i32.select $push5=, $1, $pop2, $pop4 + i32.const $push6=, 1 + i32.shl $push7=, $pop5, $pop6 + i32.sub $push9=, $pop8, $pop7 + return $pop9 .endfunc .Lfunc_end0: .size foo, .Lfunc_end0-foo diff --git a/test/torture-s/pr34154.c.s b/test/torture-s/pr34154.c.s index ae7e1181a..62d27003d 100644 --- a/test/torture-s/pr34154.c.s +++ b/test/torture-s/pr34154.c.s @@ -8,13 +8,13 @@ foo: # @foo .param i64 .result i32 # BB#0: # %entry + i32.const $push5=, 19 + i32.const $push4=, 20 i64.const $push0=, -1000000000000000000 i64.add $push1=, $0, $pop0 i64.const $push2=, 9000000000000000000 i64.lt_u $push3=, $pop1, $pop2 - i32.const $push5=, 19 - i32.const $push4=, 20 - i32.select $push6=, $pop3, $pop5, $pop4 + i32.select $push6=, $pop5, $pop4, $pop3 return $pop6 .endfunc .Lfunc_end0: diff --git a/test/torture-s/pr34415.c.s b/test/torture-s/pr34415.c.s index ee266cf1e..2d54b8cc3 100644 --- a/test/torture-s/pr34415.c.s +++ b/test/torture-s/pr34415.c.s @@ -21,15 +21,15 @@ foo: # @foo block i32.load8_s $push1=, 0($5) tee_local $push24=, $4=, $pop1 - i32.const $push23=, -97 - i32.add $push3=, $pop24, $pop23 - i32.const $push22=, 255 - i32.and $push4=, $pop3, $pop22 - i32.const $push21=, 26 - i32.lt_u $push5=, $pop4, $pop21 - i32.const $push20=, -32 - i32.add $push6=, $4, $pop20 - i32.select $push2=, $pop5, $pop6, $4 + i32.const $push23=, -32 + i32.add $push6=, $pop24, $pop23 + i32.const $push22=, -97 + i32.add $push3=, $4, $pop22 + i32.const $push21=, 255 + i32.and $push4=, $pop3, $pop21 + i32.const $push20=, 26 + i32.lt_u $push5=, $pop4, $pop20 + i32.select $push2=, $pop6, $4, $pop5 tee_local $push19=, $3=, $pop2 i32.const $push18=, 66 i32.eq $push7=, $pop19, $pop18 @@ -64,7 +64,7 @@ foo: # @foo i32.and $push14=, $4, $pop13 i32.const $push15=, 58 i32.eq $push16=, $pop14, $pop15 - i32.select $push17=, $pop16, $1, $5 + i32.select $push17=, $1, $5, $pop16 return $pop17 .LBB0_6: # %if.end22 end_block # label6: diff --git a/test/torture-s/pr34768-1.c.s b/test/torture-s/pr34768-1.c.s index 30179533b..3471e999f 100644 --- a/test/torture-s/pr34768-1.c.s +++ b/test/torture-s/pr34768-1.c.s @@ -41,7 +41,7 @@ test: # @test i32.load $1=, x($pop0) i32.const $push2=, foo@FUNCTION i32.const $push1=, bar@FUNCTION - i32.select $push3=, $0, $pop2, $pop1 + i32.select $push3=, $pop2, $pop1, $0 call_indirect $pop3 i32.const $push6=, 0 i32.load $push4=, x($pop6) diff --git a/test/torture-s/pr34768-2.c.s b/test/torture-s/pr34768-2.c.s index 517b0df46..c598f3fb8 100644 --- a/test/torture-s/pr34768-2.c.s +++ b/test/torture-s/pr34768-2.c.s @@ -44,7 +44,7 @@ test: # @test i32.load $push1=, x($pop0) i32.const $push3=, foo@FUNCTION i32.const $push2=, bar@FUNCTION - i32.select $push4=, $0, $pop3, $pop2 + i32.select $push4=, $pop3, $pop2, $0 i32.call_indirect $push5=, $pop4 i32.add $push7=, $pop1, $pop5 i32.const $push9=, 0 diff --git a/test/torture-s/pr35456.c.s b/test/torture-s/pr35456.c.s index c910ea450..0d48a7f5e 100644 --- a/test/torture-s/pr35456.c.s +++ b/test/torture-s/pr35456.c.s @@ -8,10 +8,10 @@ not_fabs: # @not_fabs .param f64 .result f64 # BB#0: # %entry + f64.neg $push2=, $0 f64.const $push0=, 0x0p0 f64.ge $push1=, $0, $pop0 - f64.neg $push2=, $0 - f64.select $push3=, $pop1, $0, $pop2 + f64.select $push3=, $0, $pop2, $pop1 return $pop3 .endfunc .Lfunc_end0: diff --git a/test/torture-s/pr36343.c.s b/test/torture-s/pr36343.c.s index b8def118d..e69446b3c 100644 --- a/test/torture-s/pr36343.c.s +++ b/test/torture-s/pr36343.c.s @@ -37,7 +37,7 @@ foo: # @foo i32.add $6=, $8, $6 i32.const $7=, 8 i32.add $7=, $8, $7 - i32.select $push0=, $0, $6, $7 + i32.select $push0=, $6, $7, $0 tee_local $push5=, $2=, $pop0 call bar@FUNCTION, $pop5 block diff --git a/test/torture-s/pr37102.c.s b/test/torture-s/pr37102.c.s index 064c1753c..50555c78f 100644 --- a/test/torture-s/pr37102.c.s +++ b/test/torture-s/pr37102.c.s @@ -45,14 +45,14 @@ main: # @main i32.const $push15=, 0 i32.store $push1=, a($pop15), $0 tee_local $push14=, $0=, $pop1 - i32.const $push2=, 2147483647 - i32.and $push3=, $pop14, $pop2 i32.const $push4=, 2 - i32.shl $push5=, $0, $pop4 + i32.shl $push5=, $pop14, $pop4 i32.const $push6=, 1 i32.or $push7=, $pop5, $pop6 i32.const $push13=, 0 - i32.select $push8=, $pop3, $pop7, $pop13 + i32.const $push2=, 2147483647 + i32.and $push3=, $0, $pop2 + i32.select $push8=, $pop7, $pop13, $pop3 call foo@FUNCTION, $pop8 i32.const $push12=, 0 return $pop12 diff --git a/test/torture-s/pr38236.c.s b/test/torture-s/pr38236.c.s index f9e1f33be..a378ff864 100644 --- a/test/torture-s/pr38236.c.s +++ b/test/torture-s/pr38236.c.s @@ -19,12 +19,12 @@ foo: # @foo i32.add $7=, $10, $7 i32.const $8=, 8 i32.add $8=, $10, $8 - i32.select $push1=, $3, $7, $8 + i32.select $push1=, $7, $8, $3 i32.const $push2=, 1 i32.store $discard=, 0($pop1), $pop2 i32.const $9=, 12 i32.add $9=, $10, $9 - i32.select $push0=, $2, $9, $0 + i32.select $push0=, $9, $0, $2 i32.load $push3=, 0($pop0) i32.const $6=, 16 i32.add $10=, $10, $6 diff --git a/test/torture-s/pr39501.c.s b/test/torture-s/pr39501.c.s index 1bde6bb9c..f1715117c 100644 --- a/test/torture-s/pr39501.c.s +++ b/test/torture-s/pr39501.c.s @@ -9,7 +9,7 @@ float_min1: # @float_min1 .result f32 # BB#0: # %entry f32.lt $push0=, $0, $1 - f32.select $push1=, $pop0, $0, $1 + f32.select $push1=, $0, $1, $pop0 return $pop1 .endfunc .Lfunc_end0: @@ -24,7 +24,7 @@ float_min2: # @float_min2 .result f32 # BB#0: # %entry f32.le $push0=, $0, $1 - f32.select $push1=, $pop0, $0, $1 + f32.select $push1=, $0, $1, $pop0 return $pop1 .endfunc .Lfunc_end1: @@ -39,7 +39,7 @@ float_max1: # @float_max1 .result f32 # BB#0: # %entry f32.gt $push0=, $0, $1 - f32.select $push1=, $pop0, $0, $1 + f32.select $push1=, $0, $1, $pop0 return $pop1 .endfunc .Lfunc_end2: @@ -54,7 +54,7 @@ float_max2: # @float_max2 .result f32 # BB#0: # %entry f32.ge $push0=, $0, $1 - f32.select $push1=, $pop0, $0, $1 + f32.select $push1=, $0, $1, $pop0 return $pop1 .endfunc .Lfunc_end3: @@ -69,7 +69,7 @@ double_min1: # @double_min1 .result f64 # BB#0: # %entry f64.lt $push0=, $0, $1 - f64.select $push1=, $pop0, $0, $1 + f64.select $push1=, $0, $1, $pop0 return $pop1 .endfunc .Lfunc_end4: @@ -84,7 +84,7 @@ double_min2: # @double_min2 .result f64 # BB#0: # %entry f64.le $push0=, $0, $1 - f64.select $push1=, $pop0, $0, $1 + f64.select $push1=, $0, $1, $pop0 return $pop1 .endfunc .Lfunc_end5: @@ -99,7 +99,7 @@ double_max1: # @double_max1 .result f64 # BB#0: # %entry f64.gt $push0=, $0, $1 - f64.select $push1=, $pop0, $0, $1 + f64.select $push1=, $0, $1, $pop0 return $pop1 .endfunc .Lfunc_end6: @@ -114,7 +114,7 @@ double_max2: # @double_max2 .result f64 # BB#0: # %entry f64.ge $push0=, $0, $1 - f64.select $push1=, $pop0, $0, $1 + f64.select $push1=, $0, $1, $pop0 return $pop1 .endfunc .Lfunc_end7: diff --git a/test/torture-s/pr40747.c.s b/test/torture-s/pr40747.c.s index 1b3566d58..9ffe947f1 100644 --- a/test/torture-s/pr40747.c.s +++ b/test/torture-s/pr40747.c.s @@ -9,9 +9,9 @@ foo: # @foo .result i32 # BB#0: # %entry i32.const $push0=, 4 - i32.lt_u $push1=, $0, $pop0 i32.const $push3=, 4 - i32.select $push2=, $pop1, $0, $pop3 + i32.lt_u $push1=, $0, $pop3 + i32.select $push2=, $0, $pop0, $pop1 return $pop2 .endfunc .Lfunc_end0: diff --git a/test/torture-s/pr42142.c.s b/test/torture-s/pr42142.c.s index adfdb5f87..e41ba94ed 100644 --- a/test/torture-s/pr42142.c.s +++ b/test/torture-s/pr42142.c.s @@ -8,15 +8,15 @@ sort: # @sort .param i32 .result i32 # BB#0: # %entry - i32.const $push0=, 10 - i32.lt_s $push1=, $0, $pop0 - i32.const $push2=, 1 - i32.lt_s $push3=, $0, $pop2 i32.const $push4=, 2 + i32.const $push2=, 1 i32.const $push8=, 1 - i32.select $push5=, $pop3, $pop4, $pop8 + i32.lt_s $push3=, $0, $pop8 + i32.select $push5=, $pop4, $pop2, $pop3 i32.const $push6=, 0 - i32.select $push7=, $pop1, $pop5, $pop6 + i32.const $push0=, 10 + i32.lt_s $push1=, $0, $pop0 + i32.select $push7=, $pop5, $pop6, $pop1 return $pop7 .endfunc .Lfunc_end0: diff --git a/test/torture-s/pr44683.c.s b/test/torture-s/pr44683.c.s index e93ec1b6f..df3641023 100644 --- a/test/torture-s/pr44683.c.s +++ b/test/torture-s/pr44683.c.s @@ -22,13 +22,13 @@ copysign_bug: # @copysign_bug br_if $pop3, 1 # 1: down to label0 .LBB0_2: # %if.end end_block # label1: + i32.const $push8=, 2 + i32.const $push7=, 3 f64.const $push4=, 0x1p0 f64.copysign $push5=, $pop4, $0 f64.const $push10=, 0x0p0 f64.lt $push6=, $pop5, $pop10 - i32.const $push8=, 2 - i32.const $push7=, 3 - i32.select $1=, $pop6, $pop8, $pop7 + i32.select $1=, $pop8, $pop7, $pop6 .LBB0_3: # %return end_block # label0: return $1 diff --git a/test/torture-s/pr45695.c.s b/test/torture-s/pr45695.c.s index 0cf99fa5f..22cdba61b 100644 --- a/test/torture-s/pr45695.c.s +++ b/test/torture-s/pr45695.c.s @@ -24,9 +24,9 @@ f: # @f # BB#0: # %entry i32.add $push0=, $2, $1 call g@FUNCTION, $pop0 - i32.eq $push1=, $2, $0 i32.const $push2=, -1 - i32.select $push3=, $pop1, $1, $pop2 + i32.eq $push1=, $2, $0 + i32.select $push3=, $1, $pop2, $pop1 return $pop3 .endfunc .Lfunc_end1: diff --git a/test/torture-s/pr46316.c.s b/test/torture-s/pr46316.c.s index b6b41eb1a..cdf8cae78 100644 --- a/test/torture-s/pr46316.c.s +++ b/test/torture-s/pr46316.c.s @@ -9,9 +9,9 @@ foo: # @foo .result i64 # BB#0: # %entry i64.const $push0=, -4 - i64.lt_s $push1=, $0, $pop0 i64.const $push11=, -4 - i64.select $push2=, $pop1, $0, $pop11 + i64.lt_s $push1=, $0, $pop11 + i64.select $push2=, $0, $pop0, $pop1 i64.const $push3=, -1 i64.xor $push4=, $pop2, $pop3 i64.add $push5=, $0, $pop4 diff --git a/test/torture-s/pr46909-1.c.s b/test/torture-s/pr46909-1.c.s index 4c0860dc7..c86392387 100644 --- a/test/torture-s/pr46909-1.c.s +++ b/test/torture-s/pr46909-1.c.s @@ -8,19 +8,19 @@ foo: # @foo .param i32 .result i32 # BB#0: # %entry - i32.const $push4=, 4 - i32.or $push5=, $0, $pop4 - i32.const $push2=, 6 - i32.eq $push6=, $pop5, $pop2 i32.const $push8=, 1 + i32.const $push12=, 1 + i32.const $push7=, -1 i32.const $push0=, 2 i32.or $push1=, $0, $pop0 - i32.const $push12=, 6 - i32.ne $push3=, $pop1, $pop12 - i32.const $push11=, 1 - i32.const $push7=, -1 - i32.select $push9=, $pop3, $pop11, $pop7 - i32.select $push10=, $pop6, $pop8, $pop9 + i32.const $push2=, 6 + i32.ne $push3=, $pop1, $pop2 + i32.select $push9=, $pop12, $pop7, $pop3 + i32.const $push4=, 4 + i32.or $push5=, $0, $pop4 + i32.const $push11=, 6 + i32.eq $push6=, $pop5, $pop11 + i32.select $push10=, $pop8, $pop9, $pop6 return $pop10 .endfunc .Lfunc_end0: diff --git a/test/torture-s/pr49039.c.s b/test/torture-s/pr49039.c.s index 5246426f6..8c5d59e06 100644 --- a/test/torture-s/pr49039.c.s +++ b/test/torture-s/pr49039.c.s @@ -18,10 +18,10 @@ foo: # @foo br_if $pop3, 0 # 0: down to label0 # BB#2: # %if.end i32.gt_u $push6=, $0, $1 - i32.select $2=, $pop6, $0, $1 + i32.select $2=, $0, $1, $pop6 block i32.lt_u $push4=, $0, $1 - i32.select $push5=, $pop4, $0, $1 + i32.select $push5=, $0, $1, $pop4 i32.const $push17=, 1 i32.ne $push7=, $pop5, $pop17 br_if $pop7, 0 # 0: down to label1 diff --git a/test/torture-s/pr49218.c.s b/test/torture-s/pr49218.c.s index d2f444421..b5ea5ac4d 100644 --- a/test/torture-s/pr49218.c.s +++ b/test/torture-s/pr49218.c.s @@ -19,36 +19,36 @@ main: # @main call __fixsfti@FUNCTION, $9, $pop0 i64.const $1=, 0 block + i64.load $push12=, 0($9) + tee_local $push17=, $5=, $pop12 + i64.const $push5=, 10 + i64.gt_u $push6=, $pop17, $pop5 i32.const $push1=, 8 i32.add $push2=, $9, $pop1 i64.load $push13=, 0($pop2) - tee_local $push17=, $5=, $pop13 - i64.const $push16=, 0 - i64.eq $push6=, $pop17, $pop16 - i64.load $push12=, 0($9) - tee_local $push15=, $4=, $pop12 - i64.const $push4=, 10 - i64.gt_u $push5=, $pop15, $pop4 + tee_local $push16=, $4=, $pop13 + i64.const $push15=, 0 + i64.gt_s $push4=, $pop16, $pop15 i64.const $push14=, 0 - i64.gt_s $push3=, $5, $pop14 - i32.select $push7=, $pop6, $pop5, $pop3 + i64.eq $push3=, $4, $pop14 + i32.select $push7=, $pop6, $pop4, $pop3 br_if $pop7, 0 # 0: down to label0 .LBB0_1: # %do.body # =>This Inner Loop Header: Depth=1 loop # label1: i64.const $2=, 1 - i64.add $0=, $4, $2 - i64.lt_u $3=, $0, $4 - i64.extend_u/i32 $4=, $3 + i64.add $0=, $5, $2 + i64.lt_u $3=, $0, $5 + i64.extend_u/i32 $5=, $3 i64.eq $3=, $0, $1 - i64.select $4=, $3, $2, $4 - i64.add $5=, $5, $4 + i64.select $5=, $2, $5, $3 + i64.add $4=, $4, $5 #APP #NO_APP - copy_local $4=, $0 + copy_local $5=, $0 i64.const $push8=, 11 i64.xor $push9=, $0, $pop8 - i64.or $push10=, $5, $pop9 + i64.or $push10=, $4, $pop9 i64.const $push19=, 0 i64.ne $push11=, $pop10, $pop19 br_if $pop11, 0 # 0: up to label1 diff --git a/test/torture-s/pr51933.c.s b/test/torture-s/pr51933.c.s index 1479bdd59..828e4ce64 100644 --- a/test/torture-s/pr51933.c.s +++ b/test/torture-s/pr51933.c.s @@ -41,15 +41,15 @@ bar: # @bar loop # label2: i32.load16_u $push3=, 0($1) tee_local $push20=, $5=, $pop3 - i32.const $push4=, 256 - i32.lt_u $push5=, $pop20, $pop4 i32.const $push6=, v2 - i32.add $push7=, $5, $pop6 + i32.add $push7=, $pop20, $pop6 i32.const $push8=, 255 i32.and $push9=, $5, $pop8 i32.const $push10=, v3 i32.add $push11=, $pop9, $pop10 - i32.select $push12=, $pop5, $pop7, $pop11 + i32.const $push4=, 256 + i32.lt_u $push5=, $5, $pop4 + i32.select $push12=, $pop7, $pop11, $pop5 i32.load8_u $push13=, 0($pop12) i32.store8 $discard=, 0($4), $pop13 i32.const $push14=, 2 diff --git a/test/torture-s/pr53160.c.s b/test/torture-s/pr53160.c.s index 2d4f09f6d..f5e3b45dc 100644 --- a/test/torture-s/pr53160.c.s +++ b/test/torture-s/pr53160.c.s @@ -43,7 +43,7 @@ main: # @main i32.store $discard=, d($2), $pop3 block i32.store16 $push2=, i($2), $0 - i32.select $push4=, $1, $pop2, $2 + i32.select $push4=, $pop2, $2, $1 i32.store $push5=, h($2), $pop4 i32.store $push6=, a($2), $pop5 br_if $pop6, 0 # 0: down to label1 diff --git a/test/torture-s/pr56205.c.s b/test/torture-s/pr56205.c.s index e40af72f2..846f56006 100644 --- a/test/torture-s/pr56205.c.s +++ b/test/torture-s/pr56205.c.s @@ -35,7 +35,7 @@ f4: # @f4 end_block # label0: i32.const $push22=, .L.str.3 i32.const $push8=, .L.str.1 - i32.select $0=, $0, $pop22, $pop8 + i32.select $0=, $pop22, $pop8, $0 i32.load $2=, 12($16) i32.const $push21=, 0 i32.const $push20=, 0 @@ -61,7 +61,7 @@ f4: # @f4 i32.add $0=, $16, $pop13 i32.const $push11=, .L.str.4 i32.const $push23=, .L.str.3 - i32.select $push12=, $4, $pop11, $pop23 + i32.select $push12=, $pop11, $pop23, $4 i32.store $discard=, 0($0), $pop12 i32.const $push14=, 4 i32.add $0=, $16, $pop14 diff --git a/test/torture-s/pr57281.c.s b/test/torture-s/pr57281.c.s index f01addc51..1d4c5d637 100644 --- a/test/torture-s/pr57281.c.s +++ b/test/torture-s/pr57281.c.s @@ -17,7 +17,7 @@ foo: # @foo i64.extend_s/i32 $push2=, $pop6 i64.store $discard=, 0($pop3), $pop2 i32.const $push5=, 0 - i32.select $push4=, $0, $pop5, $1 + i32.select $push4=, $pop5, $1, $0 return $pop4 .endfunc .Lfunc_end0: @@ -53,7 +53,7 @@ main: # @main i32.store $3=, 0($1), $pop16 i32.load $push2=, b($3) tee_local $push15=, $4=, $pop2 - i32.select $push4=, $0, $3, $pop15 + i32.select $push4=, $3, $pop15, $0 i32.store $discard=, 0($1), $pop4 i32.load $push5=, b($3) i32.const $push14=, -1 diff --git a/test/torture-s/pr58364.c.s b/test/torture-s/pr58364.c.s index 8f8b1f6e2..bf4f572af 100644 --- a/test/torture-s/pr58364.c.s +++ b/test/torture-s/pr58364.c.s @@ -8,10 +8,10 @@ foo: # @foo .param i32 .result i32 # BB#0: # %entry + i32.const $push2=, 1 i32.const $push0=, 0 i32.lt_s $push1=, $0, $pop0 - i32.const $push2=, 1 - i32.select $push3=, $pop1, $pop2, $0 + i32.select $push3=, $pop2, $0, $pop1 return $pop3 .endfunc .Lfunc_end0: diff --git a/test/torture-s/pr58726.c.s b/test/torture-s/pr58726.c.s index 5d7683cbf..aa0712a47 100644 --- a/test/torture-s/pr58726.c.s +++ b/test/torture-s/pr58726.c.s @@ -9,10 +9,10 @@ foo: # @foo .result i32 # BB#0: # %entry i32.const $push0=, 0 - i32.lt_s $push1=, $0, $pop0 + i32.load $push2=, a($pop0) i32.const $push8=, 0 - i32.load $push2=, a($pop8) - i32.select $push3=, $pop1, $0, $pop2 + i32.lt_s $push1=, $0, $pop8 + i32.select $push3=, $0, $pop2, $pop1 i32.const $push4=, 16 i32.shl $push5=, $pop3, $pop4 i32.const $push7=, 16 diff --git a/test/torture-s/pr59014-2.c.s b/test/torture-s/pr59014-2.c.s index a8d7383e9..dc532a7d4 100644 --- a/test/torture-s/pr59014-2.c.s +++ b/test/torture-s/pr59014-2.c.s @@ -8,11 +8,11 @@ foo: # @foo .param i64, i64 .result i64 # BB#0: # %entry - i64.or $push0=, $1, $0 - i32.wrap/i64 $push1=, $pop0 i64.const $push3=, 6 i64.add $push2=, $1, $0 - i64.select $push4=, $pop1, $pop3, $pop2 + i64.or $push0=, $1, $0 + i32.wrap/i64 $push1=, $pop0 + i64.select $push4=, $pop3, $pop2, $pop1 return $pop4 .endfunc .Lfunc_end0: diff --git a/test/torture-s/pr59221.c.s b/test/torture-s/pr59221.c.s index bf3d3d522..3808858cc 100644 --- a/test/torture-s/pr59221.c.s +++ b/test/torture-s/pr59221.c.s @@ -25,14 +25,14 @@ main: # @main i32.const $push21=, 0 i32.load $push1=, a($pop21) tee_local $push20=, $0=, $pop1 - i32.const $push5=, 65535 - i32.and $push6=, $pop20, $pop5 i32.const $push2=, 16 - i32.shl $push3=, $0, $pop2 + i32.shl $push3=, $pop20, $pop2 i32.const $push19=, 16 i32.shr_s $push4=, $pop3, $pop19 i32.const $push7=, -32768 - i32.select $push8=, $pop6, $pop4, $pop7 + i32.const $push5=, 65535 + i32.and $push6=, $0, $pop5 + i32.select $push8=, $pop4, $pop7, $pop6 tee_local $push18=, $0=, $pop8 i32.store16 $push10=, e($pop22), $pop18 i32.store $discard=, d($pop23), $pop10 diff --git a/test/torture-s/pr59358.c.s b/test/torture-s/pr59358.c.s index 7b5e47c12..c2ac56f3d 100644 --- a/test/torture-s/pr59358.c.s +++ b/test/torture-s/pr59358.c.s @@ -89,11 +89,11 @@ main: # @main .LBB1_4: # %if.else10 # in Loop: Header=BB1_1 Depth=1 end_block # label8: - i32.const $push25=, 4 - i32.eq $push6=, $1, $pop25 - i32.const $push24=, 24 - i32.const $push23=, 16 - i32.select $5=, $pop6, $pop24, $pop23 + i32.const $push25=, 24 + i32.const $push24=, 16 + i32.const $push23=, 4 + i32.eq $push6=, $1, $pop23 + i32.select $5=, $pop25, $pop24, $pop6 .LBB1_5: # %if.end15 # in Loop: Header=BB1_1 Depth=1 end_block # label7: @@ -118,11 +118,11 @@ main: # @main br_if $pop9, 0 # 0: down to label9 # BB#8: # %if.else28 # in Loop: Header=BB1_1 Depth=1 - i32.const $push31=, 4 - i32.eq $push10=, $1, $pop31 - i32.const $push30=, 12 - i32.const $push29=, 8 - i32.select $5=, $pop10, $pop30, $pop29 + i32.const $push31=, 12 + i32.const $push30=, 8 + i32.const $push29=, 4 + i32.eq $push10=, $1, $pop29 + i32.select $5=, $pop31, $pop30, $pop10 .LBB1_9: # %if.end34 # in Loop: Header=BB1_1 Depth=1 end_block # label9: diff --git a/test/torture-s/pr63209.c.s b/test/torture-s/pr63209.c.s index 5df0a34e9..672c0be60 100644 --- a/test/torture-s/pr63209.c.s +++ b/test/torture-s/pr63209.c.s @@ -8,25 +8,24 @@ Predictor: # @Predictor .param i32, i32 .result i32 # BB#0: # %entry - i32.const $push1=, 8 - i32.shr_u $push5=, $0, $pop1 - i32.const $push3=, 255 - i32.and $push6=, $pop5, $pop3 - i32.const $push17=, 255 - i32.and $push8=, $0, $pop17 - i32.add $push9=, $pop6, $pop8 - i32.load $push0=, 4($1) - tee_local $push16=, $1=, $pop0 + i32.load $1=, 4($1) + i32.const $push0=, 8 + i32.shr_u $push4=, $0, $pop0 + i32.const $push2=, 255 + i32.and $push5=, $pop4, $pop2 i32.const $push15=, 255 - i32.and $push7=, $pop16, $pop15 - i32.sub $push10=, $pop9, $pop7 - i32.const $push14=, 8 - i32.shr_u $push2=, $1, $pop14 - i32.const $push13=, 255 - i32.and $push4=, $pop2, $pop13 - i32.le_s $push11=, $pop10, $pop4 - i32.select $push12=, $pop11, $1, $0 - return $pop12 + i32.and $push7=, $0, $pop15 + i32.add $push8=, $pop5, $pop7 + i32.const $push14=, 255 + i32.and $push6=, $1, $pop14 + i32.sub $push9=, $pop8, $pop6 + i32.const $push13=, 8 + i32.shr_u $push1=, $1, $pop13 + i32.const $push12=, 255 + i32.and $push3=, $pop1, $pop12 + i32.le_s $push10=, $pop9, $pop3 + i32.select $push11=, $1, $0, $pop10 + return $pop11 .endfunc .Lfunc_end0: .size Predictor, .Lfunc_end0-Predictor diff --git a/test/torture-s/strcpy-1.c.s b/test/torture-s/strcpy-1.c.s index d52671df4..cfb00bbc7 100644 --- a/test/torture-s/strcpy-1.c.s +++ b/test/torture-s/strcpy-1.c.s @@ -57,14 +57,14 @@ main: # @main # Parent Loop BB0_3 Depth=3 # => This Inner Loop Header: Depth=4 loop # label10: - i32.const $push62=, 24 - i32.shl $push2=, $6, $pop62 + i32.const $push62=, 65 i32.const $push61=, 24 - i32.shr_s $push3=, $pop2, $pop61 - i32.const $push60=, 95 - i32.gt_s $push4=, $pop3, $pop60 - i32.const $push59=, 65 - i32.select $push5=, $pop4, $pop59, $6 + i32.shl $push2=, $6, $pop61 + i32.const $push60=, 24 + i32.shr_s $push3=, $pop2, $pop60 + i32.const $push59=, 95 + i32.gt_s $push4=, $pop3, $pop59 + i32.select $push5=, $pop62, $6, $pop4 i32.store8 $push6=, u2+97($8), $pop5 i32.const $push58=, 1 i32.add $6=, $pop6, $pop58 @@ -125,14 +125,14 @@ main: # @main loop # label15: i32.add $push18=, $7, $8 i32.load8_u $push19=, 0($pop18) - i32.const $push73=, 24 - i32.shl $push14=, $6, $pop73 + i32.const $push73=, 65 i32.const $push72=, 24 - i32.shr_s $push15=, $pop14, $pop72 - i32.const $push71=, 95 - i32.gt_s $push16=, $pop15, $pop71 - i32.const $push70=, 65 - i32.select $push0=, $pop16, $pop70, $6 + i32.shl $push14=, $6, $pop72 + i32.const $push71=, 24 + i32.shr_s $push15=, $pop14, $pop71 + i32.const $push70=, 95 + i32.gt_s $push16=, $pop15, $pop70 + i32.select $push0=, $pop73, $6, $pop16 tee_local $push69=, $6=, $pop0 i32.const $push68=, 255 i32.and $push17=, $pop69, $pop68 diff --git a/test/torture-s/tstdi-1.c.s b/test/torture-s/tstdi-1.c.s index c83354ef3..e84c49d4a 100644 --- a/test/torture-s/tstdi-1.c.s +++ b/test/torture-s/tstdi-1.c.s @@ -8,11 +8,11 @@ feq: # @feq .param i64 .result i32 # BB#0: # %entry - i64.const $push0=, 0 - i64.eq $push1=, $0, $pop0 i32.const $push3=, 13 i32.const $push2=, 140 - i32.select $push4=, $pop1, $pop3, $pop2 + i64.const $push0=, 0 + i64.eq $push1=, $0, $pop0 + i32.select $push4=, $pop3, $pop2, $pop1 return $pop4 .endfunc .Lfunc_end0: @@ -26,11 +26,11 @@ fne: # @fne .param i64 .result i32 # BB#0: # %entry - i64.const $push0=, 0 - i64.eq $push1=, $0, $pop0 i32.const $push3=, 140 i32.const $push2=, 13 - i32.select $push4=, $pop1, $pop3, $pop2 + i64.const $push0=, 0 + i64.eq $push1=, $0, $pop0 + i32.select $push4=, $pop3, $pop2, $pop1 return $pop4 .endfunc .Lfunc_end1: @@ -44,11 +44,11 @@ flt: # @flt .param i64 .result i32 # BB#0: # %entry - i64.const $push0=, 0 - i64.lt_s $push1=, $0, $pop0 i32.const $push3=, 13 i32.const $push2=, 140 - i32.select $push4=, $pop1, $pop3, $pop2 + i64.const $push0=, 0 + i64.lt_s $push1=, $0, $pop0 + i32.select $push4=, $pop3, $pop2, $pop1 return $pop4 .endfunc .Lfunc_end2: @@ -62,11 +62,11 @@ fge: # @fge .param i64 .result i32 # BB#0: # %entry - i64.const $push0=, -1 - i64.gt_s $push1=, $0, $pop0 i32.const $push3=, 13 i32.const $push2=, 140 - i32.select $push4=, $pop1, $pop3, $pop2 + i64.const $push0=, -1 + i64.gt_s $push1=, $0, $pop0 + i32.select $push4=, $pop3, $pop2, $pop1 return $pop4 .endfunc .Lfunc_end3: @@ -80,11 +80,11 @@ fgt: # @fgt .param i64 .result i32 # BB#0: # %entry - i64.const $push0=, 0 - i64.gt_s $push1=, $0, $pop0 i32.const $push3=, 13 i32.const $push2=, 140 - i32.select $push4=, $pop1, $pop3, $pop2 + i64.const $push0=, 0 + i64.gt_s $push1=, $0, $pop0 + i32.select $push4=, $pop3, $pop2, $pop1 return $pop4 .endfunc .Lfunc_end4: @@ -98,11 +98,11 @@ fle: # @fle .param i64 .result i32 # BB#0: # %entry - i64.const $push0=, 1 - i64.lt_s $push1=, $0, $pop0 i32.const $push3=, 13 i32.const $push2=, 140 - i32.select $push4=, $pop1, $pop3, $pop2 + i64.const $push0=, 1 + i64.lt_s $push1=, $0, $pop0 + i32.select $push4=, $pop3, $pop2, $pop1 return $pop4 .endfunc .Lfunc_end5: diff --git a/test/torture-s/vrp-1.c.s b/test/torture-s/vrp-1.c.s index e019bea44..4cf6f328b 100644 --- a/test/torture-s/vrp-1.c.s +++ b/test/torture-s/vrp-1.c.s @@ -8,12 +8,12 @@ f: # @f .param i32 .result i32 # BB#0: # %entry - i32.const $push2=, 2 - i32.eq $push3=, $0, $pop2 i32.const $push4=, 1 i32.const $push0=, -2 i32.ne $push1=, $0, $pop0 - i32.select $push5=, $pop3, $pop4, $pop1 + i32.const $push2=, 2 + i32.eq $push3=, $0, $pop2 + i32.select $push5=, $pop4, $pop1, $pop3 return $pop5 .endfunc .Lfunc_end0: diff --git a/test/waterfall b/test/waterfall -Subproject 3a22e0ed5d95fa682e06542b298c03ee249fa6c +Subproject c2b3e701d0ef96b00ab8b51f6ed62f26063e81a |