brintos

brintos / llvm-project-archived public Read only

0
0
Text · 649 B · b5fc977 Raw
22 lines · plain
1; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s2 3target triple = "wasm32-unknown-unknown"4 5; CHECK:        - Type:            CODE6; CHECK-NEXT:     Functions:7; CHECK-NEXT:       - Index:           08; CHECK-NEXT:         Locals:9; CHECK-NEXT:         Body:            41002802FFFFFFFF0F0B10define i32 @load_i32_from_negative_address() {11  %t = load i32, ptr inttoptr (i32 -1 to ptr)12  ret i32 %t13}14 15; CHECK-NEXT:       - Index:           116; CHECK-NEXT:         Locals:17; CHECK-NEXT:         Body:            41002802030B18define i32 @load_i32_from_wrapped_address() {19  %t = load i32, ptr inttoptr (i32 4294967299 to ptr)20  ret i32 %t21}22