Files
clang-p2996/llvm/test/CodeGen/MSP430/fake_use_float.ll
Acthink Yang 7263cd48e6 [LegalizeTypes][MSP430] Soften FAKE_USE operand (#142714)
Adds support for softening FAKE_USE operands.
Adds MSP430 tests that exercise the new softening code.

Fixes #137572
2025-06-05 10:53:57 +09:00

32 lines
667 B
LLVM

; RUN: llc < %s | FileCheck %s
target triple = "msp430"
; CHECK: mov #19923, r12
; CHECK: mov #4194, r12
; CHECK: mov #25688, r12
; CHECK: mov #-16245, r12
; CHECK: ret
define void @test-double() {
entry:
call void (...) @llvm.fake.use(double -8.765430e+02)
ret void
}
; CHECK: call #__mspabi_addd
; CHECK: ret
define void @test-double2(double %0) {
entry:
%1 = fadd double %0, %0
call void (...) @llvm.fake.use(double %1)
ret void
}
; CHECK: call #__mspabi_addf
; CHECK: ret
define void @test-float(float %0) {
entry:
%1 = fadd float %0, %0
call void (...) @llvm.fake.use(float %1)
ret void
}