aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2024-03-19 11:14:57 +0100
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2024-03-19 11:20:52 +0100
commitd9c31ee9568277e4303715736b40925e41503596 (patch)
tree7fc6d867292045f7c14d9e32082f4a1eba2816b1 /flang/lib/Frontend/CompilerInvocation.cpp
parent6bc6e1ace9fa8453e164fa04b5d9acd5a77e089a (diff)
downloadllvm-d9c31ee9568277e4303715736b40925e41503596.zip
llvm-d9c31ee9568277e4303715736b40925e41503596.tar.gz
llvm-d9c31ee9568277e4303715736b40925e41503596.tar.bz2
Fix overflow flag for i128 USUBO
We use the VSCBIQ/VSBIQ/VSBCBIQ family of instructions to implement USUBO/USUBO_CARRY for the i128 data type. However, these instructions use an inverted sense of the borrow indication flag (a value of 1 indicates *no* borrow, while a value of 0 indicated borrow). This does not match the semantics of the boolean "overflow" flag of the USUBO/USUBO_CARRY ISD nodes. Fix this by generating code to explicitly invert the flag. These cancel out of the result of USUBO feeds into an USUBO_CARRY. To avoid unnecessary zero-extend operations, also improve the DAGCombine handling of ZERO_EXTEND to optimize (zext (xor (trunc))) sequences where appropriate. Fixes: https://github.com/llvm/llvm-project/issues/83268
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions