summaryrefslogtreecommitdiffstats
path: root/src/test/assembly
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/assembly')
-rw-r--r--src/test/assembly/aarch64-pointer-auth.rs1
-rw-r--r--src/test/assembly/asm/avr-modifiers.rs1
-rw-r--r--src/test/assembly/asm/avr-types.rs1
-rw-r--r--src/test/assembly/asm/bpf-types.rs1
-rw-r--r--src/test/assembly/asm/msp430-types.rs1
-rw-r--r--src/test/assembly/asm/powerpc-types.rs1
-rw-r--r--src/test/assembly/stack-protector/stack-protector-target-support.rs1
-rw-r--r--src/test/assembly/x86_64-floating-point-clamp.rs25
8 files changed, 25 insertions, 7 deletions
diff --git a/src/test/assembly/aarch64-pointer-auth.rs b/src/test/assembly/aarch64-pointer-auth.rs
index 27e289086..da14cd026 100644
--- a/src/test/assembly/aarch64-pointer-auth.rs
+++ b/src/test/assembly/aarch64-pointer-auth.rs
@@ -1,6 +1,5 @@
// Test that PAC instructions are emitted when branch-protection is specified.
-// min-llvm-version: 10.0.1
// assembly-output: emit-asm
// compile-flags: --target aarch64-unknown-linux-gnu
// compile-flags: -Z branch-protection=pac-ret,leaf
diff --git a/src/test/assembly/asm/avr-modifiers.rs b/src/test/assembly/asm/avr-modifiers.rs
index aba4c982c..ffdc8f2e3 100644
--- a/src/test/assembly/asm/avr-modifiers.rs
+++ b/src/test/assembly/asm/avr-modifiers.rs
@@ -1,4 +1,3 @@
-// min-llvm-version: 13.0
// assembly-output: emit-asm
// compile-flags: --target avr-unknown-gnu-atmega328
// needs-llvm-components: avr
diff --git a/src/test/assembly/asm/avr-types.rs b/src/test/assembly/asm/avr-types.rs
index 53a601e51..58bf1ad9e 100644
--- a/src/test/assembly/asm/avr-types.rs
+++ b/src/test/assembly/asm/avr-types.rs
@@ -1,4 +1,3 @@
-// min-llvm-version: 13.0
// assembly-output: emit-asm
// compile-flags: --target avr-unknown-gnu-atmega328
// needs-llvm-components: avr
diff --git a/src/test/assembly/asm/bpf-types.rs b/src/test/assembly/asm/bpf-types.rs
index 3428d93fb..f894644cc 100644
--- a/src/test/assembly/asm/bpf-types.rs
+++ b/src/test/assembly/asm/bpf-types.rs
@@ -1,4 +1,3 @@
-// min-llvm-version: 13.0
// assembly-output: emit-asm
// compile-flags: --target bpfel-unknown-none -C target_feature=+alu32
// needs-llvm-components: bpf
diff --git a/src/test/assembly/asm/msp430-types.rs b/src/test/assembly/asm/msp430-types.rs
index 6cfb86e27..4fa2e8081 100644
--- a/src/test/assembly/asm/msp430-types.rs
+++ b/src/test/assembly/asm/msp430-types.rs
@@ -1,4 +1,3 @@
-// min-llvm-version: 13.0
// assembly-output: emit-asm
// compile-flags: --target msp430-none-elf
// needs-llvm-components: msp430
diff --git a/src/test/assembly/asm/powerpc-types.rs b/src/test/assembly/asm/powerpc-types.rs
index b8859c07e..0ca890849 100644
--- a/src/test/assembly/asm/powerpc-types.rs
+++ b/src/test/assembly/asm/powerpc-types.rs
@@ -1,4 +1,3 @@
-// min-llvm-version: 12.0.1
// revisions: powerpc powerpc64
// assembly-output: emit-asm
//[powerpc] compile-flags: --target powerpc-unknown-linux-gnu
diff --git a/src/test/assembly/stack-protector/stack-protector-target-support.rs b/src/test/assembly/stack-protector/stack-protector-target-support.rs
index 5ba46d082..2fb62e93e 100644
--- a/src/test/assembly/stack-protector/stack-protector-target-support.rs
+++ b/src/test/assembly/stack-protector/stack-protector-target-support.rs
@@ -156,7 +156,6 @@
// [r74] needs-llvm-components: x86
// [r75] compile-flags:--target x86_64-fortanix-unknown-sgx
// [r75] needs-llvm-components: x86
-// [r75] min-llvm-version: 11.0.0
// [r76] compile-flags:--target x86_64-fuchsia
// [r76] needs-llvm-components: x86
// [r77] compile-flags:--target x86_64-linux-android
diff --git a/src/test/assembly/x86_64-floating-point-clamp.rs b/src/test/assembly/x86_64-floating-point-clamp.rs
new file mode 100644
index 000000000..0f3b465d0
--- /dev/null
+++ b/src/test/assembly/x86_64-floating-point-clamp.rs
@@ -0,0 +1,25 @@
+// Floating-point clamp is designed to be implementable as max+min,
+// so check to make sure that's what it's actually emitting.
+
+// assembly-output: emit-asm
+// compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel
+// only-x86_64
+
+// CHECK-LABEL: clamp_demo:
+#[no_mangle]
+pub fn clamp_demo(a: f32, x: f32, y: f32) -> f32 {
+ // CHECK: maxss
+ // CHECK: minss
+ a.clamp(x, y)
+}
+
+// CHECK-LABEL: clamp12_demo:
+#[no_mangle]
+pub fn clamp12_demo(a: f32) -> f32 {
+ // CHECK: movss xmm1
+ // CHECK-NEXT: maxss xmm1, xmm0
+ // CHECK-NEXT: movss xmm0
+ // CHECK-NEXT: minss xmm0, xmm1
+ // CHECK: ret
+ a.clamp(1.0, 2.0)
+}