1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt < %s -instsimplify -S | FileCheck %s 3 4declare float @llvm.amdgcn.cubesc(float, float, float) 5 6define void @test(float* %p) { 7; CHECK-LABEL: @test( 8; CHECK-NEXT: store volatile float 3.000000e+00, float* [[P:%.*]] 9; CHECK-NEXT: store volatile float 3.000000e+00, float* [[P]] 10; CHECK-NEXT: store volatile float 4.000000e+00, float* [[P]] 11; CHECK-NEXT: store volatile float 4.000000e+00, float* [[P]] 12; CHECK-NEXT: store volatile float -4.000000e+00, float* [[P]] 13; CHECK-NEXT: store volatile float -3.000000e+00, float* [[P]] 14; CHECK-NEXT: store volatile float -3.000000e+00, float* [[P]] 15; CHECK-NEXT: store volatile float 3.000000e+00, float* [[P]] 16; CHECK-NEXT: store volatile float -4.000000e+00, float* [[P]] 17; CHECK-NEXT: store volatile float 4.000000e+00, float* [[P]] 18; CHECK-NEXT: store volatile float 4.000000e+00, float* [[P]] 19; CHECK-NEXT: store volatile float 3.000000e+00, float* [[P]] 20; CHECK-NEXT: store volatile float 3.000000e+00, float* [[P]] 21; CHECK-NEXT: store volatile float 3.000000e+00, float* [[P]] 22; CHECK-NEXT: store volatile float 4.000000e+00, float* [[P]] 23; CHECK-NEXT: store volatile float 4.000000e+00, float* [[P]] 24; CHECK-NEXT: store volatile float -4.000000e+00, float* [[P]] 25; CHECK-NEXT: store volatile float -3.000000e+00, float* [[P]] 26; CHECK-NEXT: store volatile float -3.000000e+00, float* [[P]] 27; CHECK-NEXT: store volatile float 3.000000e+00, float* [[P]] 28; CHECK-NEXT: store volatile float -4.000000e+00, float* [[P]] 29; CHECK-NEXT: store volatile float 4.000000e+00, float* [[P]] 30; CHECK-NEXT: store volatile float 4.000000e+00, float* [[P]] 31; CHECK-NEXT: store volatile float 3.000000e+00, float* [[P]] 32; CHECK-NEXT: store volatile float -3.000000e+00, float* [[P]] 33; CHECK-NEXT: store volatile float -3.000000e+00, float* [[P]] 34; CHECK-NEXT: store volatile float -4.000000e+00, float* [[P]] 35; CHECK-NEXT: store volatile float -4.000000e+00, float* [[P]] 36; CHECK-NEXT: store volatile float 4.000000e+00, float* [[P]] 37; CHECK-NEXT: store volatile float 3.000000e+00, float* [[P]] 38; CHECK-NEXT: store volatile float 3.000000e+00, float* [[P]] 39; CHECK-NEXT: store volatile float -3.000000e+00, float* [[P]] 40; CHECK-NEXT: store volatile float 4.000000e+00, float* [[P]] 41; CHECK-NEXT: store volatile float -4.000000e+00, float* [[P]] 42; CHECK-NEXT: store volatile float -4.000000e+00, float* [[P]] 43; CHECK-NEXT: store volatile float -3.000000e+00, float* [[P]] 44; CHECK-NEXT: store volatile float -3.000000e+00, float* [[P]] 45; CHECK-NEXT: store volatile float -3.000000e+00, float* [[P]] 46; CHECK-NEXT: store volatile float -4.000000e+00, float* [[P]] 47; CHECK-NEXT: store volatile float -4.000000e+00, float* [[P]] 48; CHECK-NEXT: store volatile float 4.000000e+00, float* [[P]] 49; CHECK-NEXT: store volatile float 3.000000e+00, float* [[P]] 50; CHECK-NEXT: store volatile float 3.000000e+00, float* [[P]] 51; CHECK-NEXT: store volatile float -3.000000e+00, float* [[P]] 52; CHECK-NEXT: store volatile float 4.000000e+00, float* [[P]] 53; CHECK-NEXT: store volatile float -4.000000e+00, float* [[P]] 54; CHECK-NEXT: store volatile float -4.000000e+00, float* [[P]] 55; CHECK-NEXT: store volatile float -3.000000e+00, float* [[P]] 56; CHECK-NEXT: ret void 57; 58 %p3p4p5 = call float @llvm.amdgcn.cubesc(float +3.0, float +4.0, float +5.0) 59 store volatile float %p3p4p5, float* %p 60 %p3p5p4 = call float @llvm.amdgcn.cubesc(float +3.0, float +5.0, float +4.0) 61 store volatile float %p3p5p4, float* %p 62 %p4p3p5 = call float @llvm.amdgcn.cubesc(float +4.0, float +3.0, float +5.0) 63 store volatile float %p4p3p5, float* %p 64 %p4p5p3 = call float @llvm.amdgcn.cubesc(float +4.0, float +5.0, float +3.0) 65 store volatile float %p4p5p3, float* %p 66 %p5p3p4 = call float @llvm.amdgcn.cubesc(float +5.0, float +3.0, float +4.0) 67 store volatile float %p5p3p4, float* %p 68 %p5p4p3 = call float @llvm.amdgcn.cubesc(float +5.0, float +4.0, float +3.0) 69 store volatile float %p5p4p3, float* %p 70 %p3p4n5 = call float @llvm.amdgcn.cubesc(float +3.0, float +4.0, float -5.0) 71 store volatile float %p3p4n5, float* %p 72 %p3p5n4 = call float @llvm.amdgcn.cubesc(float +3.0, float +5.0, float -4.0) 73 store volatile float %p3p5n4, float* %p 74 %p4p3n5 = call float @llvm.amdgcn.cubesc(float +4.0, float +3.0, float -5.0) 75 store volatile float %p4p3n5, float* %p 76 %p4p5n3 = call float @llvm.amdgcn.cubesc(float +4.0, float +5.0, float -3.0) 77 store volatile float %p4p5n3, float* %p 78 %p5p3n4 = call float @llvm.amdgcn.cubesc(float +5.0, float +3.0, float -4.0) 79 store volatile float %p5p3n4, float* %p 80 %p5p4n3 = call float @llvm.amdgcn.cubesc(float +5.0, float +4.0, float -3.0) 81 store volatile float %p5p4n3, float* %p 82 %p3n4p5 = call float @llvm.amdgcn.cubesc(float +3.0, float -4.0, float +5.0) 83 store volatile float %p3n4p5, float* %p 84 %p3n5p4 = call float @llvm.amdgcn.cubesc(float +3.0, float -5.0, float +4.0) 85 store volatile float %p3n5p4, float* %p 86 %p4n3p5 = call float @llvm.amdgcn.cubesc(float +4.0, float -3.0, float +5.0) 87 store volatile float %p4n3p5, float* %p 88 %p4n5p3 = call float @llvm.amdgcn.cubesc(float +4.0, float -5.0, float +3.0) 89 store volatile float %p4n5p3, float* %p 90 %p5n3p4 = call float @llvm.amdgcn.cubesc(float +5.0, float -3.0, float +4.0) 91 store volatile float %p5n3p4, float* %p 92 %p5n4p3 = call float @llvm.amdgcn.cubesc(float +5.0, float -4.0, float +3.0) 93 store volatile float %p5n4p3, float* %p 94 %p3n4n5 = call float @llvm.amdgcn.cubesc(float +3.0, float -4.0, float -5.0) 95 store volatile float %p3n4n5, float* %p 96 %p3n5n4 = call float @llvm.amdgcn.cubesc(float +3.0, float -5.0, float -4.0) 97 store volatile float %p3n5n4, float* %p 98 %p4n3n5 = call float @llvm.amdgcn.cubesc(float +4.0, float -3.0, float -5.0) 99 store volatile float %p4n3n5, float* %p 100 %p4n5n3 = call float @llvm.amdgcn.cubesc(float +4.0, float -5.0, float -3.0) 101 store volatile float %p4n5n3, float* %p 102 %p5n3n4 = call float @llvm.amdgcn.cubesc(float +5.0, float -3.0, float -4.0) 103 store volatile float %p5n3n4, float* %p 104 %p5n4n3 = call float @llvm.amdgcn.cubesc(float +5.0, float -4.0, float -3.0) 105 store volatile float %p5n4n3, float* %p 106 %n3p4p5 = call float @llvm.amdgcn.cubesc(float -3.0, float +4.0, float +5.0) 107 store volatile float %n3p4p5, float* %p 108 %n3p5p4 = call float @llvm.amdgcn.cubesc(float -3.0, float +5.0, float +4.0) 109 store volatile float %n3p5p4, float* %p 110 %n4p3p5 = call float @llvm.amdgcn.cubesc(float -4.0, float +3.0, float +5.0) 111 store volatile float %n4p3p5, float* %p 112 %n4p5p3 = call float @llvm.amdgcn.cubesc(float -4.0, float +5.0, float +3.0) 113 store volatile float %n4p5p3, float* %p 114 %n5p3p4 = call float @llvm.amdgcn.cubesc(float -5.0, float +3.0, float +4.0) 115 store volatile float %n5p3p4, float* %p 116 %n5p4p3 = call float @llvm.amdgcn.cubesc(float -5.0, float +4.0, float +3.0) 117 store volatile float %n5p4p3, float* %p 118 %n3p4n5 = call float @llvm.amdgcn.cubesc(float -3.0, float +4.0, float -5.0) 119 store volatile float %n3p4n5, float* %p 120 %n3p5n4 = call float @llvm.amdgcn.cubesc(float -3.0, float +5.0, float -4.0) 121 store volatile float %n3p5n4, float* %p 122 %n4p3n5 = call float @llvm.amdgcn.cubesc(float -4.0, float +3.0, float -5.0) 123 store volatile float %n4p3n5, float* %p 124 %n4p5n3 = call float @llvm.amdgcn.cubesc(float -4.0, float +5.0, float -3.0) 125 store volatile float %n4p5n3, float* %p 126 %n5p3n4 = call float @llvm.amdgcn.cubesc(float -5.0, float +3.0, float -4.0) 127 store volatile float %n5p3n4, float* %p 128 %n5p4n3 = call float @llvm.amdgcn.cubesc(float -5.0, float +4.0, float -3.0) 129 store volatile float %n5p4n3, float* %p 130 %n3n4p5 = call float @llvm.amdgcn.cubesc(float -3.0, float -4.0, float +5.0) 131 store volatile float %n3n4p5, float* %p 132 %n3n5p4 = call float @llvm.amdgcn.cubesc(float -3.0, float -5.0, float +4.0) 133 store volatile float %n3n5p4, float* %p 134 %n4n3p5 = call float @llvm.amdgcn.cubesc(float -4.0, float -3.0, float +5.0) 135 store volatile float %n4n3p5, float* %p 136 %n4n5p3 = call float @llvm.amdgcn.cubesc(float -4.0, float -5.0, float +3.0) 137 store volatile float %n4n5p3, float* %p 138 %n5n3p4 = call float @llvm.amdgcn.cubesc(float -5.0, float -3.0, float +4.0) 139 store volatile float %n5n3p4, float* %p 140 %n5n4p3 = call float @llvm.amdgcn.cubesc(float -5.0, float -4.0, float +3.0) 141 store volatile float %n5n4p3, float* %p 142 %n3n4n5 = call float @llvm.amdgcn.cubesc(float -3.0, float -4.0, float -5.0) 143 store volatile float %n3n4n5, float* %p 144 %n3n5n4 = call float @llvm.amdgcn.cubesc(float -3.0, float -5.0, float -4.0) 145 store volatile float %n3n5n4, float* %p 146 %n4n3n5 = call float @llvm.amdgcn.cubesc(float -4.0, float -3.0, float -5.0) 147 store volatile float %n4n3n5, float* %p 148 %n4n5n3 = call float @llvm.amdgcn.cubesc(float -4.0, float -5.0, float -3.0) 149 store volatile float %n4n5n3, float* %p 150 %n5n3n4 = call float @llvm.amdgcn.cubesc(float -5.0, float -3.0, float -4.0) 151 store volatile float %n5n3n4, float* %p 152 %n5n4n3 = call float @llvm.amdgcn.cubesc(float -5.0, float -4.0, float -3.0) 153 store volatile float %n5n4n3, float* %p 154 ret void 155} 156