mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-23 07:32:42 +00:00
Start inserting loads when getting a value. This is done conditionally, but in theory we could start tracking nodes which need loading differently if the `isa` is considered cumbersome.
21 lines
630 B
Plaintext
21 lines
630 B
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// AUTOUPDATE
|
|
// CHECK:STDOUT: ; ModuleID = 'local.carbon'
|
|
// CHECK:STDOUT: source_filename = "local.carbon"
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: define i32 @Run() {
|
|
// CHECK:STDOUT: entry:
|
|
// CHECK:STDOUT: %var = alloca i32, align 4
|
|
// CHECK:STDOUT: store i32 1, ptr %var, align 4
|
|
// CHECK:STDOUT: %0 = load i32, ptr %var, align 4
|
|
// CHECK:STDOUT: ret i32 %0
|
|
// CHECK:STDOUT: }
|
|
|
|
fn Run() -> i32 {
|
|
var x: i32 = 1;
|
|
return x;
|
|
}
|