about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-09-07 10:22:58 +0000
committerbors <bors@rust-lang.org>2019-09-07 10:22:58 +0000
commitef54f57c5b9d894a38179d09b00610c1b337b086 (patch)
treee5eda3465de3f5ce96734d326820e6a274bb11c4 /src/test/codegen
parentda13f06ea0dc368f1350bfc356b7f81a838defde (diff)
parent3d4cb503121d1ed0567c7a0a8b236adbda613bbe (diff)
downloadrust-ef54f57c5b9d894a38179d09b00610c1b337b086.tar.gz
rust-ef54f57c5b9d894a38179d09b00610c1b337b086.zip
Auto merge of #64246 - Centril:rollup-zey4o09, r=Centril
Rollup of 10 pull requests

Successful merges:

 - #63919 (Use hygiene for AST passes)
 - #63927 (Filter linkcheck spurious failure)
 - #64149 (rustc_codegen_llvm: give names to non-alloca variable values.)
 - #64192 (Bail out when encountering likely missing turbofish in parser)
 - #64231 (Move the HIR CFG to `rustc_ast_borrowck`)
 - #64233 (Correct pluralisation of various diagnostic messages)
 - #64236 (reduce visibility)
 - #64240 (Include compiler-rt in the source tarball)
 - #64241 ([doc] Added more prereqs and note about default directory)
 - #64243 (Move injection of attributes from command line to `libsyntax_ext`)

Failed merges:

r? @ghost
Diffstat (limited to 'src/test/codegen')
-rw-r--r--src/test/codegen/var-names.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/codegen/var-names.rs b/src/test/codegen/var-names.rs
new file mode 100644
index 00000000000..3140a7c6b6c
--- /dev/null
+++ b/src/test/codegen/var-names.rs
@@ -0,0 +1,15 @@
+// compile-flags: -O -C no-prepopulate-passes
+
+#![crate_type = "lib"]
+
+// CHECK-LABEL: define i32 @test(i32 %a, i32 %b)
+#[no_mangle]
+pub fn test(a: u32, b: u32) -> u32 {
+    let c = a + b;
+    // CHECK: %c = add i32 %a, %b
+    let d = c;
+    let e = d * a;
+    // CHECK-NEXT: %e = mul i32 %c, %a
+    e
+    // CHECK-NEXT: ret i32 %e
+}