[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / llvm / test / CodeGen / SPIRV / hlsl-intrinsics / abs.ll
blob7031129de21ac6b14d9dad3380f091d1631bfb17
1 ; RUN: llc -O0 -mtriple=spirv-unknown-linux %s -o - | FileCheck %s
3 ; CHECK: OpExtInstImport "GLSL.std.450"
5 define void @main() #1 {
6 entry:
7   %i = alloca i32, align 4
8   %absi = alloca i32, align 4
9   %f = alloca float, align 4
10   %absf = alloca float, align 4
11   %0 = load i32, ptr %i, align 4
13 ; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] SAbs %[[#]]
14   %elt.abs = call i32 @llvm.abs.i32(i32 %0, i1 false)
16   store i32 %elt.abs, ptr %absi, align 4
17   %1 = load float, ptr %f, align 4
19 ; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] FAbs %[[#]]
20   %elt.abs1 = call float @llvm.fabs.f32(float %1)
22   store float %elt.abs1, ptr %absf, align 4
23   ret void
26 declare i32 @llvm.abs.i32(i32, i1 immarg) #2
27 declare float @llvm.fabs.f32(float) #2