As discussed in http://lists.llvm.org/pipermail/llvm-dev/2020-July/143801.html. Currently no users outside of unit tests. Replace all instances in tests of -constprop with -instsimplify. Notable changes in tests: * vscale.ll - @llvm.sadd.sat.nxv16i8 is evaluated by instsimplify, use a fake intrinsic instead * InsertElement.ll - insertelement undef is removed by instsimplify in @insertelement_undef llvm/test/Transforms/ConstProp moved to llvm/test/Transforms/InstSimplify/ConstProp Reviewed By: lattner, nikic Differential Revision: https://reviews.llvm.org/D85159
45 lines
2.2 KiB
LLVM
45 lines
2.2 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt < %s -instsimplify -S | FileCheck %s
|
|
|
|
declare float @llvm.amdgcn.fmul.legacy(float, float)
|
|
|
|
define void @test(float* %p) {
|
|
; CHECK-LABEL: @test(
|
|
; CHECK-NEXT: store volatile float 6.000000e+00, float* [[P:%.*]]
|
|
; CHECK-NEXT: store volatile float 0.000000e+00, float* [[P]]
|
|
; CHECK-NEXT: store volatile float 0.000000e+00, float* [[P]]
|
|
; CHECK-NEXT: store volatile float 0.000000e+00, float* [[P]]
|
|
; CHECK-NEXT: store volatile float 0.000000e+00, float* [[P]]
|
|
; CHECK-NEXT: store volatile float 0.000000e+00, float* [[P]]
|
|
; CHECK-NEXT: store volatile float 0.000000e+00, float* [[P]]
|
|
; CHECK-NEXT: store volatile float 0.000000e+00, float* [[P]]
|
|
; CHECK-NEXT: store volatile float 0.000000e+00, float* [[P]]
|
|
; CHECK-NEXT: store volatile float 0.000000e+00, float* [[P]]
|
|
; CHECK-NEXT: store volatile float 0.000000e+00, float* [[P]]
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%a = call float @llvm.amdgcn.fmul.legacy(float +2.0, float +3.0)
|
|
store volatile float %a, float* %p
|
|
%b = call float @llvm.amdgcn.fmul.legacy(float +2.0, float +0.0)
|
|
store volatile float %b, float* %p
|
|
%c = call float @llvm.amdgcn.fmul.legacy(float +2.0, float -0.0)
|
|
store volatile float %c, float* %p
|
|
%d = call float @llvm.amdgcn.fmul.legacy(float +0.0, float +0.0)
|
|
store volatile float %d, float* %p
|
|
%e = call float @llvm.amdgcn.fmul.legacy(float +0.0, float -0.0)
|
|
store volatile float %e, float* %p
|
|
%f = call float @llvm.amdgcn.fmul.legacy(float -0.0, float +0.0)
|
|
store volatile float %f, float* %p
|
|
%g = call float @llvm.amdgcn.fmul.legacy(float -0.0, float -0.0)
|
|
store volatile float %g, float* %p
|
|
%h = call float @llvm.amdgcn.fmul.legacy(float +0.0, float 0x7ff0000000000000) ; +inf
|
|
store volatile float %h, float* %p
|
|
%i = call float @llvm.amdgcn.fmul.legacy(float 0xfff0000000000000, float +0.0) ; -inf
|
|
store volatile float %i, float* %p
|
|
%j = call float @llvm.amdgcn.fmul.legacy(float 0x7ff0001000000000, float -0.0) ; +nan
|
|
store volatile float %j, float* %p
|
|
%k = call float @llvm.amdgcn.fmul.legacy(float -0.0, float 0xfff0000100000000) ; -nan
|
|
store volatile float %k, float* %p
|
|
ret void
|
|
}
|