;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. ;; RUN: wasm-opt %s --signext-lowering --enable-sign-ext -S -o - | filecheck %s (module ;; CHECK: (type $0 (func)) (type $0 (func)) ;; CHECK: (func $signext ;; CHECK-NEXT: (local $0 i32) ;; CHECK-NEXT: (local $1 i64) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (i32.shr_s ;; CHECK-NEXT: (i32.shl ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 24) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 24) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (i32.shr_s ;; CHECK-NEXT: (i32.shl ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 16) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 16) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (i64.shr_s ;; CHECK-NEXT: (i64.shl ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: (i64.const 56) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i64.const 56) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (i64.shr_s ;; CHECK-NEXT: (i64.shl ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: (i64.const 48) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i64.const 48) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (i64.shr_s ;; CHECK-NEXT: (i64.shl ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: (i64.const 32) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i64.const 32) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $signext (type $0) (local $0 i32) (local $1 i64) (drop (i32.extend8_s (local.get $0))) (drop (i32.extend16_s (local.get $0))) (drop (i64.extend8_s (local.get $1))) (drop (i64.extend16_s (local.get $1))) (drop (i64.extend32_s (local.get $1))) ) )