-
Couldn't load subscription status.
- Fork 15k
Fix Linux kernel build failure for SytemZ. #165274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… conditional branch for 14 possible combinations of CC mask.
…ng in SystemZISelLowering.cpp.
… bound for all backend suuporting flag output operand (X86, AARCH64 and SystemZ). - Remove all changes target specific changes from SelectionDAGBuiler.cpp. - Added getJumpConditionMergingParams for SystemZ for setting cost for merging srl/ipm/cc. - TODO: Handle the cases where simplifyBranchOnICmpChain creates switch table while folding branch on And'd or Or'd chain of icmp instructions.
…plified conmbineCCMask as a result.
1. Remove check for CCValid if it has already been combined. 2. Added logic to check if TrueVal/FalseVal of two select_ccmask are matching or inverted.
1. Put outer select_ccmask and br_ccmask back to worklist so as to allow processing from outer select_ccmask/br_ccmask to combine with (icmp (select_ccmask)). 2. Remove combineICMP.
1. Remove combineTM and move code to combineCCMask and combine select_ccmask or br_ccmask with (TM (select_ccmask cc-value)). cc-value is (SRL (IPM (CC))). 2. Implement xor (select_ccmask .. CC) cc-value for cases where only one bit is set or on clear bit in CCMask. 3. Constrained combineOR, combineXOR and combineAND optimization for combinations of TrueVal Vs FalseVal between the select_ccmask.
1. Extend (icmp (select_ccmask .. CC)) to include (tm (select_ccmask .. CC )) in combineCCMask. 2. In combineXOR and combineAND modified (TM (select_ccmask cc-value)) and (ICMP ((select_ccmask cc-value)) respectively where either one bit is set or only one bit is clear. 3. Added compile time evaluation of CCMask for above modified select_ccmask when all subexpressions of select_ccmask are either constant or (SRL (IPM CC)). 4. Added more constraints to combineOR, combineXOR and combineAND optimization.
2. Refactored combinedOR/combineXOR/combineAND common code into new function combineLogicalOpCCMask.
…into combineLogicalOpCCMask.
…y be used for future work.
…assumption that CC actually results in the numerical condition code value CCVal, and return vector of CCVals for each position. 2. Implement findCCUse routine that finds a CC that is used as condition code and the associated CCValid mask. 3. Code related to select_ccmask in combineCCMask has been removed, as this computation has been done in new framework. 4. Remove combineLogicalOpCCMask as simplifyAssumingCCVal fully recurses through logical operations.
findCCUse from simplifyAssumingCCVal. 2. Remove ICMP and TM case from findCCUse. 3. Generaize TrueVal and FalseVal in outermost select_ccmask in combineSELECT_CCMASK, 4. Emulating TM for all CCMask. 5. Incorporated other code review feedback.
…Int to avoid truncation. 2. Pass DAG instead of DCI to combineCCMask and SimplifyAssumingCCVals, and make these functions static instead of SystemZTargetLowering member function. 3. Treat SRL, SRA, SHL like other binary operators, and remove check for constant. This makes it even more generalized. 4. ADD, OR, XOR, AND, and SRA might clobber CC, added check hasOneUse(). 5. Incorporated other code review feedback.
…and() 2. Change setOutputOperand() implementation by directly setting ImmRange fields Min/Max/isConstrainedlds.
2. Ignore git-clang-format one error in SystemZISelLowering.cpp in this commit.
…nstraint. 2. Removed flag_output_operand_cc*. 3. Renamed systemz_asm_flag_outut.c to systemz_asm_flag_output.c.
…porary created from CopyFromReg. 2. Modify the select_ccmask test cases.
…C, which can not be furher be optimized.
… output of INLINEASM is GR32Bit general-purpose register. It should be SystemZ::CC instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/17559 Here is the relevant piece of the build log for the reference |
Linux kernel build fails for SystemZ as output of INLINEASM was GR32Bit general-purpose register instead of SystemZ::CC. --------- Co-authored-by: anoopkg6 <anoopkg6@github.com> Co-authored-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Linux kernel build fails for SystemZ as output of INLINEASM was GR32Bit general-purpose register instead of SystemZ::CC.