|
149 | 149 | <li><a href="#int_count">Bit counting Intrinsics</a>
|
150 | 150 | <ol>
|
151 | 151 | <li><a href="#int_ctpop">'<tt>llvm.ctpop</tt>' Intrinsic </a></li>
|
152 |
| - <li><a href="#int_cttz">'<tt>llvm.cttz</tt>' Intrinsic </a></li> |
153 | 152 | <li><a href="#int_ctlz">'<tt>llvm.ctlz</tt>' Intrinsic </a></li>
|
| 153 | + <li><a href="#int_cttz">'<tt>llvm.cttz</tt>' Intrinsic </a></li> |
154 | 154 | </ol>
|
155 | 155 | </li>
|
156 | 156 | <li><a href="#int_debugger">Debugger intrinsics</a></li>
|
@@ -3205,74 +3205,77 @@ <h5>Semantics:</h5>
|
3205 | 3205 |
|
3206 | 3206 | <!-- _______________________________________________________________________ -->
|
3207 | 3207 | <div class="doc_subsubsection">
|
3208 |
| - <a name="int_cttz">'<tt>llvm.cttz</tt>' Intrinsic</a> |
| 3208 | + <a name="int_ctlz">'<tt>llvm.ctlz</tt>' Intrinsic</a> |
3209 | 3209 | </div>
|
3210 | 3210 |
|
3211 | 3211 | <div class="doc_text">
|
3212 | 3212 |
|
3213 | 3213 | <h5>Syntax:</h5>
|
3214 | 3214 | <pre>
|
3215 |
| - declare int %llvm.cttz(int <src>) |
| 3215 | + declare int %llvm.ctlz(int <src>) |
3216 | 3216 |
|
3217 | 3217 | </pre>
|
3218 | 3218 |
|
3219 | 3219 | <h5>Overview:</h5>
|
3220 | 3220 |
|
3221 | 3221 | <p>
|
3222 |
| -The '<tt>llvm.cttz</tt>' intrinsic counts the number of trailing zeros. |
| 3222 | +The '<tt>llvm.ctlz</tt>' intrinsic counts the number of leading zeros in a |
| 3223 | +variable. |
3223 | 3224 | </p>
|
3224 | 3225 |
|
3225 | 3226 | <h5>Arguments:</h5>
|
3226 | 3227 |
|
3227 | 3228 | <p>
|
3228 | 3229 | The only argument is the value to be counted. The argument may be of any
|
3229 |
| -integer type. The return type must match the argument type. |
| 3230 | +integer type. The return type must match the argument type. |
3230 | 3231 | </p>
|
3231 | 3232 |
|
3232 | 3233 | <h5>Semantics:</h5>
|
3233 | 3234 |
|
3234 | 3235 | <p>
|
3235 |
| -The '<tt>llvm.cttz</tt>' intrinsic counts the trailing zeros in a variable. If |
3236 |
| -the src == 0 then the result is the size in bits of the type of src. |
| 3236 | +The '<tt>llvm.ctlz</tt>' intrinsic counts the leading (most significant) zeros |
| 3237 | +in a variable. If the src == 0 then the result is the size in bits of the type |
| 3238 | +of src. For example, <tt>llvm.cttz(int 2) = 30</tt>. |
3237 | 3239 | </p>
|
3238 | 3240 | </div>
|
3239 | 3241 |
|
| 3242 | + |
| 3243 | + |
3240 | 3244 | <!-- _______________________________________________________________________ -->
|
3241 | 3245 | <div class="doc_subsubsection">
|
3242 |
| - <a name="int_ctlz">'<tt>llvm.ctlz</tt>' Intrinsic</a> |
| 3246 | + <a name="int_cttz">'<tt>llvm.cttz</tt>' Intrinsic</a> |
3243 | 3247 | </div>
|
3244 | 3248 |
|
3245 | 3249 | <div class="doc_text">
|
3246 | 3250 |
|
3247 | 3251 | <h5>Syntax:</h5>
|
3248 | 3252 | <pre>
|
3249 |
| - declare int %llvm.ctlz(int <src>) |
| 3253 | + declare int %llvm.cttz(int <src>) |
3250 | 3254 |
|
3251 | 3255 | </pre>
|
3252 | 3256 |
|
3253 | 3257 | <h5>Overview:</h5>
|
3254 | 3258 |
|
3255 | 3259 | <p>
|
3256 |
| -The '<tt>llvm.ctlz</tt>' intrinsic counts the number of leading zeros in a |
3257 |
| -variable. |
| 3260 | +The '<tt>llvm.cttz</tt>' intrinsic counts the number of trailing zeros. |
3258 | 3261 | </p>
|
3259 | 3262 |
|
3260 | 3263 | <h5>Arguments:</h5>
|
3261 | 3264 |
|
3262 | 3265 | <p>
|
3263 | 3266 | The only argument is the value to be counted. The argument may be of any
|
3264 |
| -integer type. The return type must match the argument type. |
| 3267 | +integer type. The return type must match the argument type. |
3265 | 3268 | </p>
|
3266 | 3269 |
|
3267 | 3270 | <h5>Semantics:</h5>
|
3268 | 3271 |
|
3269 | 3272 | <p>
|
3270 |
| -The '<tt>llvm.ctlz</tt>' intrinsic counts the leading zeros in a variable. If |
3271 |
| -the src == 0 then the result is the size in bits of the type of src. |
| 3273 | +The '<tt>llvm.cttz</tt>' intrinsic counts the trailing (least significant) zeros |
| 3274 | +in a variable. If the src == 0 then the result is the size in bits of the type |
| 3275 | +of src. For example, <tt>llvm.cttz(2) = 1</tt>. |
3272 | 3276 | </p>
|
3273 | 3277 | </div>
|
3274 | 3278 |
|
3275 |
| - |
3276 | 3279 | <!-- ======================================================================= -->
|
3277 | 3280 | <div class="doc_subsection">
|
3278 | 3281 | <a name="int_debugger">Debugger Intrinsics</a>
|
|
0 commit comments