Jacob Young
7a1499f14e
[SystemZ] Fix assertion failures during DAG combine ( #215027 )
...
Repro:
```llvm
target triple = "s390x-linux-gnu"
define <2 x half> @fabs_v2f16(<2 x half> %arg) "target-cpu"="z16" {
%bits = bitcast <2 x half> %arg to <2 x i16>
%is_neg = icmp slt <2 x i16> %bits, zeroinitializer
%neg = fneg <2 x half> %arg
%res = select <2 x i1> %is_neg, <2 x half> %neg, <2 x half> %arg
ret <2 x half> %res
}
```
```console
$ llc fp-half-vector-abs.ll
llc: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:7343: SDValue llvm::SelectionDAG::getNode(unsigned int, const SDLoc &, EVT, SDValue, const SDNodeFlags): Assertion `N1.getValueType().bitsGT(VT) && "Invalid truncate node, src < dst!"' failed.
```
Previously this code would generate:
i16 = bitcast f16
i32 = truncate i16
Which would immediately assert due to the invalid truncate, but even
with that fixed it would assert later due to the illegal i16. Instead,
use the same lowering as `LowerOperationWrapper` for the bitcast.
(cherry picked from commit 1c518910af602a246cbf7cd4fe90c4fbd15a758c)
2026-08-20 21:09:43 +00:00
..
2026-03-10 15:38:05 +01:00
2026-03-10 15:38:05 +01:00
2026-03-10 15:38:05 +01:00
2026-06-29 14:52:28 +02:00
2026-05-06 20:34:24 +02:00
2026-03-10 15:38:05 +01:00
2026-03-10 15:38:05 +01:00
2026-03-10 15:38:05 +01:00
2026-04-30 09:31:39 -07:00
2026-03-10 15:38:05 +01:00
2026-04-30 09:31:39 -07:00
2026-03-10 15:38:05 +01:00
2026-04-30 09:31:39 -07:00
2026-04-30 09:31:39 -07:00
2026-06-29 14:52:28 +02:00
2026-04-30 09:31:39 -07:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-07-08 09:34:04 -04:00
2026-07-06 09:37:20 -04:00
2026-07-08 09:34:04 -04:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-05-29 14:16:22 +02:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-03-10 15:38:05 +01:00
2026-03-05 09:03:55 +01:00
2026-02-24 19:21:05 +01:00
2026-06-29 14:52:28 +02:00
2026-05-27 16:42:22 +02:00
2026-05-27 16:42:22 +02:00
2026-06-29 14:52:28 +02:00
2026-08-20 21:09:43 +00:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-07-06 18:26:05 -07:00
2026-07-06 18:26:05 -07:00
2026-07-06 18:26:05 -07:00
2026-05-01 11:23:24 -07:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-05-01 11:23:24 -07:00
2026-06-29 14:52:28 +02:00
2026-03-10 15:38:05 +01:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-06-23 13:07:39 +02:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-03-22 17:19:24 +01:00
2026-06-29 14:52:28 +02:00
2026-06-23 13:07:39 +02:00
2026-03-10 15:38:05 +01:00
2026-05-06 10:25:52 +02:00
2026-05-06 10:25:52 +02:00
2026-03-10 15:38:05 +01:00
2026-05-04 17:49:56 +02:00
2026-03-10 15:38:05 +01:00
2026-06-29 14:52:28 +02:00
2026-03-10 15:38:05 +01:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-06-23 19:04:31 +00:00
2026-07-08 09:34:04 -04:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-02-24 19:21:05 +01:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-07-06 18:26:05 -07:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-05-01 11:23:24 -07:00
2026-05-01 11:23:24 -07:00
2026-05-01 11:23:24 -07:00
2026-05-01 11:23:24 -07:00
2026-05-29 09:17:49 +02:00
2026-05-29 09:17:49 +02:00
2026-05-29 09:17:49 +02:00
2026-05-29 09:17:49 +02:00
2026-06-29 14:52:28 +02:00
2026-06-23 12:21:03 +02:00
2026-04-23 15:27:25 +01:00
2026-07-06 18:26:05 -07:00
2026-04-17 12:23:56 +01:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-03-10 15:38:05 +01:00
2026-05-10 09:01:17 +00:00
2026-05-10 09:01:17 +00:00
2026-06-29 14:52:28 +02:00
2026-07-14 12:21:10 +02:00
2026-07-14 12:21:10 +02:00
2026-07-14 12:21:10 +02:00
2026-06-23 13:07:39 +02:00
2026-06-03 10:21:19 +02:00
2026-06-23 13:07:39 +02:00
2026-06-29 14:52:28 +02:00
2026-04-11 06:16:43 +00:00
2026-03-10 15:38:05 +01:00
2026-06-29 14:52:28 +02:00
2026-06-29 14:52:28 +02:00
2026-02-27 14:02:00 -05:00
2026-07-08 09:34:04 -04:00
2026-07-09 16:48:26 -04:00
2026-07-31 11:18:27 +02:00
2026-07-08 09:34:04 -04:00
2026-03-09 13:31:05 -04:00
2026-04-10 16:36:15 -04:00
2026-04-10 16:36:15 -04:00
2026-07-13 11:23:35 -04:00
2026-04-10 16:36:15 -04:00
2026-07-13 10:52:31 -04:00
2026-07-13 10:52:31 -04:00
2026-07-15 08:22:52 +00:00
2026-07-08 09:34:04 -04:00
2026-07-09 16:48:26 -04:00
2026-04-10 16:36:15 -04:00
2026-07-08 09:34:04 -04:00
2026-03-09 13:31:05 -04:00
2026-04-10 16:36:15 -04:00