Commit acff049
authored
[NVPTX] Add max/minimumnum to ISel (#155804)
Add direct support for the LLVM `maximumnum` and `minimumnum`
intrinsics for NVPTX, rather than lowering them to a sequence of
compare + select instructions.
The `maximumnum` and `minimumnum` intrinsics map directly to PTX
`max`/`min` instructions.
In future, the LLVM `maxnum`/`minnum` intrinsics might need some fix-ups
for sNaN handling added, but currently both `llvm.maxnum` and
`llvm.maximumnum` will map directly to PTX `max` instructions.1 parent 12630ed commit acff049
File tree
3 files changed
+426
-4
lines changed- llvm
- lib/Target/NVPTX
- test/CodeGen/NVPTX
3 files changed
+426
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
| 546 | + | |
| 547 | + | |
546 | 548 | | |
547 | 549 | | |
548 | 550 | | |
| |||
989 | 991 | | |
990 | 992 | | |
991 | 993 | | |
992 | | - | |
| 994 | + | |
| 995 | + | |
993 | 996 | | |
994 | 997 | | |
995 | 998 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| |||
911 | 911 | | |
912 | 912 | | |
913 | 913 | | |
914 | | - | |
915 | | - | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
916 | 923 | | |
917 | 924 | | |
918 | 925 | | |
| |||
0 commit comments